From f96c33972b03dbe56f60c3e756933cfbaedc99f8 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Mon, 23 Jan 2023 18:46:20 +0100 Subject: [PATCH] Avoid using class scope for timers (#558) * avoid using class scope for timers * fix copy paste error * protocol --- protocol | 2 +- src/room/timers.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/protocol b/protocol index e20cc76010..8a49ab3e6c 160000 --- a/protocol +++ b/protocol @@ -1 +1 @@ -Subproject commit e20cc76010aaae9dfcd6c7869c2ee6da7280610d +Subproject commit 8a49ab3e6c26a9680460d266fdde5f3af2ec5ee2 diff --git a/src/room/timers.ts b/src/room/timers.ts index a33b23723d..62cb876e58 100644 --- a/src/room/timers.ts +++ b/src/room/timers.ts @@ -4,11 +4,13 @@ * that the timer fires on time. */ export default class CriticalTimers { - static setTimeout = setTimeout; + // eslint-disable-next-line @typescript-eslint/no-implied-eval + static setTimeout = (...args: Parameters) => setTimeout(...args); - static setInterval = setInterval; + // eslint-disable-next-line @typescript-eslint/no-implied-eval + static setInterval = (...args: Parameters) => setInterval(...args); - static clearTimeout = clearTimeout; + static clearTimeout = (...args: Parameters) => clearTimeout(...args); - static clearInterval = clearInterval; + static clearInterval = (...args: Parameters) => clearInterval(...args); }