mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Fix messageSW function signature (#36486)
Fix `messageSW` function signature to have data being sent as a parameter Also updated the `activated` event to use the `WorkboxUpdatableEvent` as it's event type as it includes a `isUpdate` boolean as well
This commit is contained in:
committed by
Benjamin Lichtman
parent
52909ba7eb
commit
b2222be876
Vendored
+2
-2
@@ -37,7 +37,7 @@ interface WokerboxEventMap {
|
||||
installed: WorkboxEvent;
|
||||
waiting: WorkboxWaitingEvent;
|
||||
controlling: WorkboxEvent;
|
||||
activated: WorkboxEvent;
|
||||
activated: WorkboxUpdatableEvent;
|
||||
redundant: WorkboxEvent;
|
||||
externalinstalled: WorkboxExtendableEvent;
|
||||
externalwaiting: WorkboxExtendableEvent;
|
||||
@@ -106,7 +106,7 @@ declare class Workbox extends EventTargetShim {
|
||||
* returned by `messageSW()`. If no response is set, the promise will never
|
||||
* resolve.
|
||||
*/
|
||||
messageSW(): Promise<object>;
|
||||
messageSW(data: any): Promise<object>;
|
||||
|
||||
addEventListener<K extends keyof WokerboxEventMap>(type: K, listener: (this: Workbox, ev: WokerboxEventMap[K]) => void): void;
|
||||
removeEventListener<K extends keyof WokerboxEventMap>(type: K, listener: (this: Workbox, ev: WokerboxEventMap[K]) => void): void;
|
||||
|
||||
Reference in New Issue
Block a user