lquixada / cross-fetch

Universal WHATWG Fetch API for Node, Browsers and React Native.
MIT License
1.66k stars 102 forks source link

fix: add types to polyfill #147

Closed stuft2 closed 1 year ago

stuft2 commented 1 year ago

Type definition resolution isn't working for me when importing cross-fetch/polyfill. Adding the types property to the package.json file resolves this issue.

import 'cross-fetch/polyfill'
//  error TS2304: Cannot find name 'Request'.
lquixada commented 1 year ago

@stuft2 thanks for the PR!