jimmywarting / FormData

HTML5 `FormData` polyfill for Browsers and nodejs
MIT License
360 stars 102 forks source link

error TS2322: Type 'FormData' is not assignable to type 'BodyInit'. #133

Closed etodanik closed 3 years ago

etodanik commented 3 years ago

Using FormData with node-fetch@3.0.0 results in the following error:

error TS2322: Type 'FormData' is not assignable to type 'BodyInit'.
  Property 'sort' is missing in type 'FormData' but required in type 'URLSearchParams'.
jimmywarting commented 3 years ago

Hmm, FormData don't have a sort method... think this might be an issue with node-fetch

new URLSearchParams().sort exists but this formdata don't have anything to do with URLSearchParams...