diff --git a/src/index.ts b/src/index.ts index 9b4d4db..f4452c3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -135,6 +135,9 @@ export const DEFAULT_TIMEOUT = 60_000 // 1 minute const defaultSerialize = (i: any) => i const defaultDeserialize = defaultSerialize +// store setTimeout locally in case it is overriden later +const { setTimeout } = globalThis + export function createBirpc( functions: LocalFunctions, options: BirpcOptions,