UNPKG

ngx-pwa

Version:

Provides functionality around the progressive web app functionality in angular. Most notably the an approach to cache POST, UPDATE and DELETE requests.

36 lines (35 loc) 1.06 kB
import { MatDialog } from '@angular/material/dialog'; import { SwUpdate } from '@angular/service-worker'; /** * Provides helpers for handling pwa version updates. */ export declare class NgxPwaUpdateService { private readonly swUpdate; private readonly dialog; constructor(swUpdate: SwUpdate, dialog: MatDialog); /** * Subscribes to any version update events. */ subscribeToUpdateEvents(): void; /** * Gets called when no new version was found. */ protected onNoNewVersionDetected(): void; /** * Gets called when the installation of a new version fails. */ protected onVersionInstallationFailed(): void; /** * Gets called when a new version has been found. */ protected onVersionDetected(): void; /** * Gets called when a new version has been installed. */ protected onVersionReady(): Promise<void>; /** * Manually checks for updates. * @returns Whether or not new updates are available. */ checkForUpdates(): Promise<boolean>; }