@types/serviceworker 0.0.133 → 0.0.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.d.ts +20 -4
- package/package.json +1 -1
- package/ts5.5/index.d.ts +20 -4
- package/ts5.6/index.d.ts +20 -4
package/README.md
CHANGED
|
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
|
|
|
28
28
|
|
|
29
29
|
## Deploy Metadata
|
|
30
30
|
|
|
31
|
-
You can read what changed in version 0.0.
|
|
31
|
+
You can read what changed in version 0.0.135 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.135.
|
package/index.d.ts
CHANGED
|
@@ -484,6 +484,11 @@ interface PushEventInit extends ExtendableEventInit {
|
|
|
484
484
|
data?: PushMessageDataInit;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
|
|
488
|
+
newSubscription?: PushSubscription;
|
|
489
|
+
oldSubscription?: PushSubscription;
|
|
490
|
+
}
|
|
491
|
+
|
|
487
492
|
interface PushSubscriptionJSON {
|
|
488
493
|
endpoint?: string;
|
|
489
494
|
expirationTime?: EpochTimeStamp | null;
|
|
@@ -4891,6 +4896,17 @@ declare var PushSubscription: {
|
|
|
4891
4896
|
new(): PushSubscription;
|
|
4892
4897
|
};
|
|
4893
4898
|
|
|
4899
|
+
/** Available only in secure contexts. */
|
|
4900
|
+
interface PushSubscriptionChangeEvent extends ExtendableEvent {
|
|
4901
|
+
readonly newSubscription: PushSubscription | null;
|
|
4902
|
+
readonly oldSubscription: PushSubscription | null;
|
|
4903
|
+
}
|
|
4904
|
+
|
|
4905
|
+
declare var PushSubscriptionChangeEvent: {
|
|
4906
|
+
prototype: PushSubscriptionChangeEvent;
|
|
4907
|
+
new(type: string, eventInitDict?: PushSubscriptionChangeEventInit): PushSubscriptionChangeEvent;
|
|
4908
|
+
};
|
|
4909
|
+
|
|
4894
4910
|
/**
|
|
4895
4911
|
* The **`PushSubscriptionOptions`** interface of the Push API represents the options associated with a push subscription.
|
|
4896
4912
|
* Available only in secure contexts.
|
|
@@ -5343,7 +5359,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
|
|
|
5343
5359
|
"notificationclick": NotificationEvent;
|
|
5344
5360
|
"notificationclose": NotificationEvent;
|
|
5345
5361
|
"push": PushEvent;
|
|
5346
|
-
"pushsubscriptionchange":
|
|
5362
|
+
"pushsubscriptionchange": PushSubscriptionChangeEvent;
|
|
5347
5363
|
}
|
|
5348
5364
|
|
|
5349
5365
|
/**
|
|
@@ -5374,7 +5390,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
5374
5390
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/push_event) */
|
|
5375
5391
|
onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
5376
5392
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event) */
|
|
5377
|
-
onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev:
|
|
5393
|
+
onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
|
|
5378
5394
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/registration) */
|
|
5379
5395
|
readonly registration: ServiceWorkerRegistration;
|
|
5380
5396
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/serviceWorker) */
|
|
@@ -5426,7 +5442,7 @@ interface ServiceWorkerRegistration extends EventTarget {
|
|
|
5426
5442
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/unregister) */
|
|
5427
5443
|
unregister(): Promise<boolean>;
|
|
5428
5444
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/update) */
|
|
5429
|
-
update(): Promise<
|
|
5445
|
+
update(): Promise<ServiceWorkerRegistration>;
|
|
5430
5446
|
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
5431
5447
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
5432
5448
|
removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
@@ -9018,7 +9034,7 @@ declare var onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: Notificat
|
|
|
9018
9034
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/push_event) */
|
|
9019
9035
|
declare var onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
9020
9036
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event) */
|
|
9021
|
-
declare var onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev:
|
|
9037
|
+
declare var onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
|
|
9022
9038
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/registration) */
|
|
9023
9039
|
declare var registration: ServiceWorkerRegistration;
|
|
9024
9040
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/serviceWorker) */
|
package/package.json
CHANGED
package/ts5.5/index.d.ts
CHANGED
|
@@ -484,6 +484,11 @@ interface PushEventInit extends ExtendableEventInit {
|
|
|
484
484
|
data?: PushMessageDataInit;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
|
|
488
|
+
newSubscription?: PushSubscription;
|
|
489
|
+
oldSubscription?: PushSubscription;
|
|
490
|
+
}
|
|
491
|
+
|
|
487
492
|
interface PushSubscriptionJSON {
|
|
488
493
|
endpoint?: string;
|
|
489
494
|
expirationTime?: EpochTimeStamp | null;
|
|
@@ -4891,6 +4896,17 @@ declare var PushSubscription: {
|
|
|
4891
4896
|
new(): PushSubscription;
|
|
4892
4897
|
};
|
|
4893
4898
|
|
|
4899
|
+
/** Available only in secure contexts. */
|
|
4900
|
+
interface PushSubscriptionChangeEvent extends ExtendableEvent {
|
|
4901
|
+
readonly newSubscription: PushSubscription | null;
|
|
4902
|
+
readonly oldSubscription: PushSubscription | null;
|
|
4903
|
+
}
|
|
4904
|
+
|
|
4905
|
+
declare var PushSubscriptionChangeEvent: {
|
|
4906
|
+
prototype: PushSubscriptionChangeEvent;
|
|
4907
|
+
new(type: string, eventInitDict?: PushSubscriptionChangeEventInit): PushSubscriptionChangeEvent;
|
|
4908
|
+
};
|
|
4909
|
+
|
|
4894
4910
|
/**
|
|
4895
4911
|
* The **`PushSubscriptionOptions`** interface of the Push API represents the options associated with a push subscription.
|
|
4896
4912
|
* Available only in secure contexts.
|
|
@@ -5343,7 +5359,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
|
|
|
5343
5359
|
"notificationclick": NotificationEvent;
|
|
5344
5360
|
"notificationclose": NotificationEvent;
|
|
5345
5361
|
"push": PushEvent;
|
|
5346
|
-
"pushsubscriptionchange":
|
|
5362
|
+
"pushsubscriptionchange": PushSubscriptionChangeEvent;
|
|
5347
5363
|
}
|
|
5348
5364
|
|
|
5349
5365
|
/**
|
|
@@ -5374,7 +5390,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
5374
5390
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/push_event) */
|
|
5375
5391
|
onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
5376
5392
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event) */
|
|
5377
|
-
onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev:
|
|
5393
|
+
onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
|
|
5378
5394
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/registration) */
|
|
5379
5395
|
readonly registration: ServiceWorkerRegistration;
|
|
5380
5396
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/serviceWorker) */
|
|
@@ -5426,7 +5442,7 @@ interface ServiceWorkerRegistration extends EventTarget {
|
|
|
5426
5442
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/unregister) */
|
|
5427
5443
|
unregister(): Promise<boolean>;
|
|
5428
5444
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/update) */
|
|
5429
|
-
update(): Promise<
|
|
5445
|
+
update(): Promise<ServiceWorkerRegistration>;
|
|
5430
5446
|
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
5431
5447
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
5432
5448
|
removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
@@ -9018,7 +9034,7 @@ declare var onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: Notificat
|
|
|
9018
9034
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/push_event) */
|
|
9019
9035
|
declare var onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
9020
9036
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event) */
|
|
9021
|
-
declare var onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev:
|
|
9037
|
+
declare var onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
|
|
9022
9038
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/registration) */
|
|
9023
9039
|
declare var registration: ServiceWorkerRegistration;
|
|
9024
9040
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/serviceWorker) */
|
package/ts5.6/index.d.ts
CHANGED
|
@@ -484,6 +484,11 @@ interface PushEventInit extends ExtendableEventInit {
|
|
|
484
484
|
data?: PushMessageDataInit;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
|
|
488
|
+
newSubscription?: PushSubscription;
|
|
489
|
+
oldSubscription?: PushSubscription;
|
|
490
|
+
}
|
|
491
|
+
|
|
487
492
|
interface PushSubscriptionJSON {
|
|
488
493
|
endpoint?: string;
|
|
489
494
|
expirationTime?: EpochTimeStamp | null;
|
|
@@ -4891,6 +4896,17 @@ declare var PushSubscription: {
|
|
|
4891
4896
|
new(): PushSubscription;
|
|
4892
4897
|
};
|
|
4893
4898
|
|
|
4899
|
+
/** Available only in secure contexts. */
|
|
4900
|
+
interface PushSubscriptionChangeEvent extends ExtendableEvent {
|
|
4901
|
+
readonly newSubscription: PushSubscription | null;
|
|
4902
|
+
readonly oldSubscription: PushSubscription | null;
|
|
4903
|
+
}
|
|
4904
|
+
|
|
4905
|
+
declare var PushSubscriptionChangeEvent: {
|
|
4906
|
+
prototype: PushSubscriptionChangeEvent;
|
|
4907
|
+
new(type: string, eventInitDict?: PushSubscriptionChangeEventInit): PushSubscriptionChangeEvent;
|
|
4908
|
+
};
|
|
4909
|
+
|
|
4894
4910
|
/**
|
|
4895
4911
|
* The **`PushSubscriptionOptions`** interface of the Push API represents the options associated with a push subscription.
|
|
4896
4912
|
* Available only in secure contexts.
|
|
@@ -5343,7 +5359,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
|
|
|
5343
5359
|
"notificationclick": NotificationEvent;
|
|
5344
5360
|
"notificationclose": NotificationEvent;
|
|
5345
5361
|
"push": PushEvent;
|
|
5346
|
-
"pushsubscriptionchange":
|
|
5362
|
+
"pushsubscriptionchange": PushSubscriptionChangeEvent;
|
|
5347
5363
|
}
|
|
5348
5364
|
|
|
5349
5365
|
/**
|
|
@@ -5374,7 +5390,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
5374
5390
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/push_event) */
|
|
5375
5391
|
onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
5376
5392
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event) */
|
|
5377
|
-
onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev:
|
|
5393
|
+
onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
|
|
5378
5394
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/registration) */
|
|
5379
5395
|
readonly registration: ServiceWorkerRegistration;
|
|
5380
5396
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/serviceWorker) */
|
|
@@ -5426,7 +5442,7 @@ interface ServiceWorkerRegistration extends EventTarget {
|
|
|
5426
5442
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/unregister) */
|
|
5427
5443
|
unregister(): Promise<boolean>;
|
|
5428
5444
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/update) */
|
|
5429
|
-
update(): Promise<
|
|
5445
|
+
update(): Promise<ServiceWorkerRegistration>;
|
|
5430
5446
|
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
5431
5447
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
5432
5448
|
removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
@@ -9018,7 +9034,7 @@ declare var onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: Notificat
|
|
|
9018
9034
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/push_event) */
|
|
9019
9035
|
declare var onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
9020
9036
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event) */
|
|
9021
|
-
declare var onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev:
|
|
9037
|
+
declare var onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
|
|
9022
9038
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/registration) */
|
|
9023
9039
|
declare var registration: ServiceWorkerRegistration;
|
|
9024
9040
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/serviceWorker) */
|