From 781570bba4bd851e99cd98c72639db8301e8666f Mon Sep 17 00:00:00 2001 From: rishabhpoddar Date: Fri, 1 Mar 2024 17:16:50 +0530 Subject: [PATCH] fixes ts issue --- lib/build/utils.js | 6 +++--- lib/ts/utils.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/build/utils.js b/lib/build/utils.js index 5a57b061f..15c52f433 100644 --- a/lib/build/utils.js +++ b/lib/build/utils.js @@ -48,11 +48,11 @@ const normalisedURLPath_1 = __importDefault(require("./normalisedURLPath")); const logger_1 = require("./logger"); const constants_1 = require("./constants"); const cross_fetch_1 = __importDefault(require("cross-fetch")); -const doFetch = (...args) => { +const doFetch = (input, init) => { if (typeof fetch !== "undefined") { - return fetch(...args); + return fetch(input, init); } - return cross_fetch_1.default(...args); + return cross_fetch_1.default(input, init); }; exports.doFetch = doFetch; function getLargestVersionFromIntersection(v1, v2) { diff --git a/lib/ts/utils.ts b/lib/ts/utils.ts index f60552408..3523bbe5f 100644 --- a/lib/ts/utils.ts +++ b/lib/ts/utils.ts @@ -10,11 +10,11 @@ import crossFetch from "cross-fetch"; import { LoginMethod, User } from "./user"; import { SessionContainer } from "./recipe/session"; -export const doFetch: typeof fetch = (...args) => { +export const doFetch: typeof fetch = (input: RequestInfo | URL, init?: RequestInit | undefined) => { if (typeof fetch !== "undefined") { - return fetch(...args); + return fetch(input, init); } - return crossFetch(...args); + return crossFetch(input, init); }; export function getLargestVersionFromIntersection(v1: string[], v2: string[]): string | undefined {