-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser Notification type definition incorrect #14701
Browser Notification type definition incorrect #14701
Comments
Just stumbled over the same issue a today... |
Seems we are also missing |
PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes. |
I think this would require modifying |
Does that mean that the actual bug is in Edge? Any hope to get it fixed there? |
I'm not sure how I removed <interface name="Notification" extends="EventTarget">
<constants>
<constant name="permission" type="NotificationPermission" />
</constants>
... The output was more along the lines of what OP suggested interface Notification extends EventTarget {
...
readonly permission: NotificationPermission;
}
declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
readonly permission: NotificationPermission;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
} I don't think the build tool supports removing things from the interface while keeping it in the var declaration, but I just started tinkering with it so I might wrong. |
Issue Fixed. microsoft#14701 Browser Notification type definition incorrect
@csgulyas Yes, you've identified the issue correctly. The That, I think, should fix this issue, altough there still is a lot of work ahead. A huge thanks to people working on that. Also related to #3027 |
Which version fixes this?
|
Should be in |
TypeScript Version: 2.2.1
Looking at lib.es6.d.ts we have
and
The
permission
string is a static property on theNotification
class.i.e. We should have:
and it should be removed from the
Notification
Interface definition.The text was updated successfully, but these errors were encountered: