Skip to content
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

PushManager getSubscription missing possible null return #21821

Closed
arjunyel opened this issue Feb 9, 2018 · 2 comments
Closed

PushManager getSubscription missing possible null return #21821

arjunyel opened this issue Feb 9, 2018 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this

Comments

@arjunyel
Copy link

arjunyel commented Feb 9, 2018

TypeScript Version: 2.8.0-dev.20180208

Search Terms: pushManager getSubscription() TSJS

Code

ServiceWorkerRegistration.pushManager.getSubscription().then((PushSubscription) => {
console.log(PushSubscription);
});

Expected behavior:

Per the spec getSubscription returns type PushSubscription or null.

Actual behavior:
getSubscription returns type PushSubscription

@mhegazy mhegazy added Bug A bug in TypeScript Help Wanted You can do this Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Feb 9, 2018
@mhegazy mhegazy added this to the Community milestone Feb 9, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Feb 9, 2018

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.

@arjunyel
Copy link
Author

arjunyel commented Feb 9, 2018

PR submitted 🎉 microsoft/TypeScript-DOM-lib-generator#367

@mhegazy mhegazy added the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Feb 9, 2018
@mhegazy mhegazy self-assigned this Feb 9, 2018
@mhegazy mhegazy modified the milestones: Community, TypeScript 2.8 Feb 9, 2018
@mhegazy mhegazy reopened this Feb 9, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Feb 12, 2018
@mhegazy mhegazy removed the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Feb 12, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

2 participants