developit/unfetch

packages/isomorphic-unfetch/index.d.ts - Exports and export assignments are not permitted in module augmentations.

eryi opened this issue · 3 comments

eryi commented

When trying to compile using Typescript, I got the following error:

node_modules/isomorphic-unfetch/index.d.ts:18:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.

18   export = unfetch;
     ~~~~~~

I don't really understand what's happening but I managed to work around it by manually deleting line 18.

In case its helpful to anybody, steps to reproduce:
Typescript Version 2.9.2

cd node_modules/isomorphic-unfetch
echo "{}" > tsconfig.json
tsc
eryi commented

Just to clarify above, my project is using Typescript and I was trying to compile that. I wasn't trying to compile isomorphic-unfetch with Typescript.

I have the same exactly issue today.

Fixed in unfetch@3.1.1 / isomorphic-unfetch@2.1.1