You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used version of the node-fetch contains own declaration of the AbortController types that is incompatible with the native declaration. It leads to the TS error:
Type 'AbortSignal' is not assignable to type 'import("/Users/specc/codex/docs/node_modules/@types/node-fetch/externals").AbortSignal'.
Types of property 'onabort' are incompatible.
Type '((this: AbortSignal, ev: Event) => any) | null' is not assignable to type '((this: AbortSignal, event: any) => void) | null'.
Type '(this: AbortSignal, ev: Event) => any' is not assignable to type '(this: AbortSignal, event: any) => void'.
The 'this' types of each signature are incompatible.
Type 'AbortSignal' is missing the following properties from type 'AbortSignal': reason, throwIfAbortedts(2322)
Problem description
node-fetch
contains own declaration of the AbortController types that is incompatible with the native declaration. It leads to the TS error:See the related issue node-fetch/node-fetch#741
That problem fixed in one of 3.* version
Possible solutions
node-fetch
to the latest version. Set"type": "module"
inpackage.json
. Then update all application imports, fix possible problems.node-fetch
toaxios
or other toolAlso, see this issue.
The text was updated successfully, but these errors were encountered: