-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix TypeScript support #17
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution. Why is the |
Well, I'm using TypeScript 3.5.2 and it didn't work until I added declarations manually. |
I'm using TypeScript 3.5.2, too, but I couldn't reproduce it. The Would you provide repro steps? |
IntelliJ IDE doesn't offer any autocomplete and I'm using relatively strict mode in TypeScript, will share tsconfig.json a bit later. |
My
|
Sorry, I still couldn't reproduce it. The A console log
|
Hi, I just wanted to echo @nazar-pc's problem here (I'm also running into it), and also point at the TypeScript documentation for this situation, which is here. I'm intrigued why |
@mysticatea, why is this not merged yet? |
I think this problem is specific to IntelliJ. I'm only able to reproduce the problem with IntelliJ - both VSCode and According to the typescript handbook:
Since I tried searching YouTrack for an issue, but didn't find one, so it may be worth reporting to JetBrains if this issue is important to you. FWIW, IntelliJ will find the type definitions if you provide a path mapping in your tsconfig: {
"compilerOptions": {
"paths": {
"abort-controller": [
"./node_modules/abort-controller/dist/abort-controller.d.ts"
]
}
}
} |
Why tho? It only takes to add 1 line in |
🤷 If it were me, I would probably just add it... But, I think @mysticatea is reasonable in taking the principled position that this package conforms to TypeScript's module resolution rules, and it is not a maintainer's responsibility to work around bugs in discretionary tools chosen by the community. |
Fixes #16