-
-
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
TypeScript error: "Type 'AbortSignal' is missing the following properties from type 'AbortSignal': reason, throwIfAborted" #36
Comments
Yup, I simply deleted my line import AbortController from "abort-controller"; and then removed that npm package npm un abort-controller and I was good to go. |
I might be wrong but this solution would only work if the code was to be executed only on the browser, right? What if we need to use it in a node service? Is this interface globally available as well in this case? |
This was in a node service for me using axios. I don't know what provides the type but I do have |
Since v15.4.0 Node.js comes with |
@cmd-johnson cheers, I realize that's why it works, I was mentioning the types for VSCode to not complain, which undoubtedly is provided by my @types/node install. I think I incorrectly ascertained that @riboher was missing that. Seems they were just speculating. |
Using latest version of all packages at time of writing:
package.json
:main.ts
:We can fix it by using the global
AbortController
type:The text was updated successfully, but these errors were encountered: