From 2dd050bd906b7221b50e11a81dab1655a81a3010 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 23 Nov 2021 19:23:15 +0530 Subject: [PATCH] Change object to Record --- src/matrix/net/common.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/net/common.ts b/src/matrix/net/common.ts index 7a07c445..0cabdb1f 100644 --- a/src/matrix/net/common.ts +++ b/src/matrix/net/common.ts @@ -23,7 +23,7 @@ export interface IEncodedBody { length: number; } -export function encodeQueryParams(queryParams?: object): string { +export function encodeQueryParams(queryParams?: Record): string { return Object.entries(queryParams || {}) .filter(([, value]) => value !== undefined) .map(([name, value]) => { @@ -35,7 +35,7 @@ export function encodeQueryParams(queryParams?: object): string { .join("&"); } -export function encodeBody(body: {}): IEncodedBody { +export function encodeBody(body: Record): IEncodedBody { // todo: code change here if (body instanceof BlobHandle) { const blob = body as BlobHandle;