diff --git a/src/matrix/net/common.ts b/src/matrix/net/common.ts index 5fd5c963..4ba42395 100644 --- a/src/matrix/net/common.ts +++ b/src/matrix/net/common.ts @@ -22,7 +22,7 @@ export type EncodedBody = { body: BlobHandle | string; } -export function encodeQueryParams(queryParams?: Record): string { +export function encodeQueryParams(queryParams?: object): string { return Object.entries(queryParams || {}) .filter(([, value]) => value !== undefined) .map(([name, value]) => { @@ -34,7 +34,7 @@ export function encodeQueryParams(queryParams?: Record): string { .join("&"); } -export function encodeBody(body: BlobHandle | Record): EncodedBody { +export function encodeBody(body: BlobHandle | object): EncodedBody { if (body instanceof BlobHandle) { const blob = body as BlobHandle; return {