TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

parameter in FormData doesn't match MDN reference

Open r3wt opened this issue 2 years ago • 2 comments

https://developer.mozilla.org/en-US/docs/Web/API/FormData/set

The field's value. This can be a string or Blob (including subclasses such as File). If none of these are specified the value is converted to a string.

wouldn't it then be string|Blob|{ toString(): string }?

r3wt avatar Aug 27 '23 16:08 r3wt

toString exists everywhere so that's effectively any, which we don't want. I think historically TypeScript guided for explicit toString() in such case.

saschanaz avatar Dec 10 '23 11:12 saschanaz

Ref: https://github.com/microsoft/TypeScript/issues/38347

HolgerJeromin avatar Dec 11 '23 12:12 HolgerJeromin