From 5e9bbf5091b35eafeefaf9297953ca8fa0856f48 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 27 Jul 2023 10:39:40 +0100 Subject: [PATCH] Update types --- src/@types/global.d.ts | 6 ------ test/unit-tests/vector/platform/PWAPlatform-test.ts | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 0145673ec98..bb8fcae601e 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -55,12 +55,6 @@ declare global { on(channel: ElectronChannel, listener: (event: Event, ...args: any[]) => void): void; send(channel: ElectronChannel, ...args: any[]): void; } - - interface Navigator { - // PWA badging extensions https://w3c.github.io/badging/ - setAppBadge?(count: number): Promise; - clearAppBadge?(): Promise; - } } // add method which is missing from the node typing diff --git a/test/unit-tests/vector/platform/PWAPlatform-test.ts b/test/unit-tests/vector/platform/PWAPlatform-test.ts index 59632d0bb6c..e9b508b2113 100644 --- a/test/unit-tests/vector/platform/PWAPlatform-test.ts +++ b/test/unit-tests/vector/platform/PWAPlatform-test.ts @@ -45,6 +45,7 @@ describe("PWAPlatform", () => { }); it("should fall back to WebPlatform::setNotificationCount if no Navigator::setAppBadge", () => { + // @ts-ignore navigator.setAppBadge = undefined; const platform = new PWAPlatform(); const superMethod = mocked(WebPlatform.prototype.setNotificationCount);