Open
Description
This works in the browser, but the TS definition doesn't allow it:
new URLSearchParams(new FormData(document.querySelector('form')));
The type is currently:
declare var URLSearchParams: {
prototype: URLSearchParams;
new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
};
The specification says that it should accept a "sequence", not specifically an array https://url.spec.whatwg.org/#concept-urlsearchparams-new
Metadata
Metadata
Assignees
Labels
No labels