From 3304d3541250eeefe03d1a6dac9cea766ed410ba Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 9 May 2022 10:01:10 +0100 Subject: [PATCH] arg --- src/@types/global.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 92f68c0dccf..679a6afba6e 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -20,14 +20,14 @@ import "@matrix-org/olm"; export {}; declare global { - namespace NodeJS { - // use `number` as the return type in all cases for global.set{Interval,Timeout}, - // so we don't accidentally use the methods on NodeJS.Timeout - they only exist in a subset of environments. - // The overload for clear{Interval,Timeout} is resolved as expected. - // We use `ReturnType` in the code to be agnostic of if this definition gets loaded. - function setInterval(handler: TimerHandler, timeout: number, ...arguments: any[]): number; - function setTimeout(handler: TimerHandler, timeout: number, ...arguments: any[]): number; + // use `number` as the return type in all cases for global.set{Interval,Timeout}, + // so we don't accidentally use the methods on NodeJS.Timeout - they only exist in a subset of environments. + // The overload for clear{Interval,Timeout} is resolved as expected. + // We use `ReturnType` in the code to be agnostic of if this definition gets loaded. + function setInterval(handler: TimerHandler, timeout: number, ...arguments: any[]): number; + function setTimeout(handler: TimerHandler, timeout: number, ...arguments: any[]): number; + namespace NodeJS { interface Global { localStorage: Storage; }