Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Jul 27, 2023
1 parent 9b3cae6 commit 5e9bbf5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 0 additions & 6 deletions src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>;
clearAppBadge?(): Promise<void>;
}
}

// add method which is missing from the node typing
Expand Down
1 change: 1 addition & 0 deletions test/unit-tests/vector/platform/PWAPlatform-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5e9bbf5

Please sign in to comment.