Skip to content

PushManager getSubscription missing possible null return #21821

Closed
@arjunyel

Description

@arjunyel

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

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions