Within my TypeScript project, I am currently utilizing "whatwg-fetch": "2.0.3" as the latest version of this polyfill. Additionally, for types, I am using version "@types/whatwg-fetch": "0.0.33", and everything functions smoothly when working with TypeScript version "2.2.0".
However, I now wish to upgrade TypeScript to the most recent version, "2.5.3", and encounter an issue during compilation. The first error that arises is:
D:\Projects\AppStoreSource\appstore\source\AppStore\node_modules\@types\whatwg-fetch\index.d.ts (11,13): error TS2451: Cannot redeclare block-scoped variable 'fetch'.
Indeed, on line 11, the declaration exists as follows:
declare let fetch: typeof window.fetch;
Alternatively,
D:\Projects\AppStoreSource\appstore\source\AppStore\node_modules\@types\whatwg-fetch\index.d.ts (13,14): error TS2300: Duplicate identifier 'HeadersInit'.
Has anyone else encountered issues using "whatwg-fetch" with the newest TypeScript version? Could the problem lie in loaders or perhaps a conflict in definitions? It seems like there may be duplicate definitions, but I am uncertain... help?
Is there an alternative polyfill available that is compatible with TypeScript "2.5.3"? Preferably one that does not require manual adjustments to typings files.
Thank you for any assistance provided.