Change object to Record

This commit is contained in:
RMidhunSuresh 2021-11-23 19:23:15 +05:30
parent 9b315d1564
commit 2dd050bd90

View File

@ -23,7 +23,7 @@ export interface IEncodedBody {
length: number;
}
export function encodeQueryParams(queryParams?: object): string {
export function encodeQueryParams(queryParams?: Record<string, any>): 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<string, any>): IEncodedBody {
// todo: code change here
if (body instanceof BlobHandle) {
const blob = body as BlobHandle;