mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
refactor: update makeURLSearchParams to accept readonly non-Records (#8868)
This commit is contained in:
@@ -43,7 +43,7 @@ function serializeSearchParam(value: unknown): string | null {
|
||||
* @param options - The options to use
|
||||
* @returns A populated URLSearchParams instance
|
||||
*/
|
||||
export function makeURLSearchParams(options?: Record<string, unknown>) {
|
||||
export function makeURLSearchParams<T extends object>(options?: Readonly<T>) {
|
||||
const params = new URLSearchParams();
|
||||
if (!options) return params;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user