From 59f1a2d022907d2144d5fc3e11d210fa0da95479 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 23 Nov 2023 13:10:23 +0100 Subject: [PATCH] Switch NodeJS.Timer to NodeJS.Timeout (#6916) The latest version of types/node had some breaking changes related to Timer and Timeout, #6739. It turns out that we incorrectly used the type Timer when Timeout was expected in a few places. This PR resolves them, in an effort to unblock the @types/node upgrade. --- apps/desktop/src/auth/login/login-approval.component.ts | 2 +- apps/desktop/src/main/messaging.main.ts | 2 +- apps/desktop/src/main/window.main.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/auth/login/login-approval.component.ts b/apps/desktop/src/auth/login/login-approval.component.ts index 4fee03eb8a..0e2c03af35 100644 --- a/apps/desktop/src/auth/login/login-approval.component.ts +++ b/apps/desktop/src/auth/login/login-approval.component.ts @@ -28,7 +28,7 @@ export class LoginApprovalComponent implements OnInit, OnDestroy { email: string; fingerprintPhrase: string; authRequestResponse: AuthRequestResponse; - interval: NodeJS.Timer; + interval: NodeJS.Timeout; requestTimeText: string; dismissModal: boolean; diff --git a/apps/desktop/src/main/messaging.main.ts b/apps/desktop/src/main/messaging.main.ts index 2dec019da8..b63f285813 100644 --- a/apps/desktop/src/main/messaging.main.ts +++ b/apps/desktop/src/main/messaging.main.ts @@ -12,7 +12,7 @@ import { MenuUpdateRequest } from "./menu/menu.updater"; const SyncInterval = 5 * 60 * 1000; // 5 minutes export class MessagingMain { - private syncTimeout: NodeJS.Timer; + private syncTimeout: NodeJS.Timeout; constructor(private main: Main, private stateService: StateService) {} diff --git a/apps/desktop/src/main/window.main.ts b/apps/desktop/src/main/window.main.ts index cf792a9348..de24254cc5 100644 --- a/apps/desktop/src/main/window.main.ts +++ b/apps/desktop/src/main/window.main.ts @@ -26,7 +26,7 @@ export class WindowMain { isQuitting = false; isClosing = false; - private windowStateChangeTimer: NodeJS.Timer; + private windowStateChangeTimer: NodeJS.Timeout; private windowStates: { [key: string]: WindowState } = {}; private enableAlwaysOnTop = false; private session: Electron.Session;