ethanent / phin

Node HTTP client
MIT License
576 stars 33 forks source link

Cannot find name 'URL' - Broken type for IOptionsBase #58

Closed frg-dev closed 3 years ago

frg-dev commented 4 years ago

I believe URL is not defined as a global unless you are using dom types. https://github.com/Microsoft/TypeScript/issues/10792

Screen Shot 2020-11-05 at 7 17 44 PM

As a workaround, adding a d.ts file with the following solves it for now.

declare type URL = import('url').URL;
ethanent commented 3 years ago

Thanks, a PR would be much appreciated if anyone is interested.