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
#148 seems to have introduced a regression of sorts when using a library which has its own definitions of types used by fetch.
The following code worked fine with earlier versions, but it appears that the introduction of types to polyfill/package.json causes some conflicts to occur:
Running tsc on this project leads to a bunch of errors about conflicts between node_modules/typescript/lib/lib.dom.d.ts and node_modules/@cloudflare/workers-types/2022-11-30/index.d.ts.
I have discovered a workaround - creating an empty file and remapping the path in tsconfig's compilerOptions:
However, it seems like cross-fetch/polyfill shouldn't be specifying a specific types, and should instead be relying on tsconfig to include the appropriate types (either via lib or types).
The text was updated successfully, but these errors were encountered:
#148 seems to have introduced a regression of sorts when using a library which has its own definitions of types used by
fetch
.The following code worked fine with earlier versions, but it appears that the introduction of
types
topolyfill/package.json
causes some conflicts to occur:cross-fetch/polyfill/package.json
Line 7 in 1fb2350
Here is an example project.
package.json
tsconfig.json
index.ts
Running
tsc
on this project leads to a bunch of errors about conflicts betweennode_modules/typescript/lib/lib.dom.d.ts
andnode_modules/@cloudflare/workers-types/2022-11-30/index.d.ts
.I have discovered a workaround - creating an empty file and remapping the path in tsconfig's
compilerOptions
:However, it seems like
cross-fetch/polyfill
shouldn't be specifying a specifictypes
, and should instead be relying ontsconfig
to include the appropriate types (either vialib
ortypes
).The text was updated successfully, but these errors were encountered: