docs(service-worker): add UpdateActivated/AvailableEvent to the public API (#23138)

PR Close #23138
This commit is contained in:
George Kalpakas
2018-04-02 14:51:06 +03:00
committed by Jason Aden
parent 9953fe7c00
commit 7aed64d3a1
3 changed files with 37 additions and 11 deletions

View File

@ -27,3 +27,29 @@ export declare class SwUpdate {
activateUpdate(): Promise<void>;
checkForUpdate(): Promise<void>;
}
/** @experimental */
export interface UpdateActivatedEvent {
current: {
hash: string;
appData?: Object;
};
previous?: {
hash: string;
appData?: Object;
};
type: 'UPDATE_ACTIVATED';
}
/** @experimental */
export interface UpdateAvailableEvent {
available: {
hash: string;
appData?: Object;
};
current: {
hash: string;
appData?: Object;
};
type: 'UPDATE_AVAILABLE';
}