@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
12 lines (11 loc) • 479 B
TypeScript
export default class ServiceWorkerHelper {
private readonly serviceWorker;
constructor(sw: ServiceWorker | null);
/**
* This method sends a message to the service worker and waits for a response.
* It resolves when the service worker responds with a message that contains the same `messageId` as sent.
* @param message The message to send to the service worker.
* @returns
*/
sendMessageToServiceWorker(message: object): Promise<void>;
}