leoek / fetch-to-curl

Convert javascript fetch requests to curl
MIT License
67 stars 13 forks source link

Cannot find name 'HeadersInit' #27

Closed gkhunger-sf closed 3 years ago

gkhunger-sf commented 3 years ago

Hi,

After updating to 0.5.0, it has started failing with:

node_modules/fetch-to-curl/types/main.d.ts:5:24 - error TS2304: Cannot find name 'HeadersInit'.

5     constructor(init?: HeadersInit);

Thanks, Gaurav

leoek commented 3 years ago

Hi @gkhunger-sf from my understanding HeadersInit should usually be available in the types provided by typescript. How did you get that error (which typescript version, tsc cli or IDE)?

leoek commented 3 years ago

@gkhunger-sf I published 0.5.2 which includes the HeadersInit type. Can you please try whether the issue is gone with it?

gkhunger-sf commented 3 years ago

Updating to 0.5.2 fixed it. Thanks, Leonard!