Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BadgeUpdater.ts
interface Navigator {
setAppBadge(value: number): void;
clearAppBadge(): void;
}
namespace Windows.UI.Notifications {
export class BadgeUpdater {
public static setNumber(value: number) {
if (navigator.setAppBadge) {
navigator.setAppBadge(value);
}
}
public static clear() {
if (navigator.clearAppBadge) {
navigator.clearAppBadge();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment