14 lines
520 B
TypeScript
14 lines
520 B
TypeScript
// Service worker initialization - creates and exports the SW instance
|
|
// Other modules in the bundle can import from here
|
|
import * as env from './env.js';
|
|
declare var self: env.ServiceWindow;
|
|
|
|
import { ServiceWorker } from './classes.serviceworker.js';
|
|
import type { ServiceworkerBackend } from './classes.backend.js';
|
|
|
|
const sw = new ServiceWorker(self);
|
|
|
|
export const getServiceWorkerInstance = (): ServiceWorker => sw;
|
|
|
|
export const getServiceWorkerBackend = (): ServiceworkerBackend => sw.leleServiceWorkerBackend;
|