The method signature for appending to a URLSearchParams object in TypeScript is defined as
append(name: string, value: string): void;
.
While I successfully appended an array and number in the browser, it resulted in an error when running the TypeScript code.
A visit to MDN revealed an example where a number was used as a value: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/append
I am curious if values other than strings can be used in TypeScript.