Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter in FormData doesn't match MDN reference #1614

Open
r3wt opened this issue Aug 27, 2023 · 2 comments
Open

parameter in FormData doesn't match MDN reference #1614

r3wt opened this issue Aug 27, 2023 · 2 comments

Comments

@r3wt
Copy link

r3wt commented Aug 27, 2023

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 }?

@saschanaz
Copy link
Contributor

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

@HolgerJeromin
Copy link

Ref: microsoft/TypeScript#38347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants