diff --git a/src/Sage.ts b/src/Sage.ts index ad39683..80b917a 100644 --- a/src/Sage.ts +++ b/src/Sage.ts @@ -80,9 +80,10 @@ export class Sage { /** * Sets query parameters for the request. - * @param query + * @param query Supposed to be just a record of strings and numbers. + * Other values/types will be ignored. */ - query(query: Record): this { + query(query: object): this { this.request.query = query; return this; } diff --git a/src/SageHttpRequest.ts b/src/SageHttpRequest.ts index b845fcf..81688f6 100644 --- a/src/SageHttpRequest.ts +++ b/src/SageHttpRequest.ts @@ -5,7 +5,7 @@ import { IncomingHttpHeaders } from 'undici/types/header.js'; export interface SageHttpRequest { method?: HttpMethod; path?: string; - query?: Record; + query?: object; // Should always be a string since Undici doesn't support other types body?: string;