TypeScript Version: 2.2.1
Looking at lib.es6.d.ts we have
interface Notification extends EventTarget {
// ...
readonly permission: string;
// ...
}
and
declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<string>;
}
The permission string is a static property on the Notification class.
i.e. We should have:
declare var Notification: {
prototype: Notification;
readonly permission: string;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<string>;
}
and it should be removed from the Notification Interface definition.
TypeScript Version: 2.2.1
Looking at lib.es6.d.ts we have
and
The
permissionstring is a static property on theNotificationclass.i.e. We should have:
and it should be removed from the
NotificationInterface definition.