Closed
Description
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