How to use the workbox-window.messageSW function in workbox-window

To help you get started, we’ve selected a few workbox-window examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / workbox-window / workbox-window-tests.ts View on Github external
workbox.register(registerOptions);

    // $ExpectType void
    workbox.removeEventListener(eventType, eventListener);
}

//==============================================================================
// WorkboxWindow.messageSW
//==============================================================================

export namespace MessageSWTest {
    declare const data: any;
    declare const worker: ServiceWorker;

    // $ExpectType Promise
    messageSW(worker, data);
}

workbox-window

Simplifies communications with Workbox packages running in the service worker

MIT
Latest version published 2 months ago

Package Health Score

97 / 100
Full package analysis