Files

25 lines
656 B
TypeScript
Raw Permalink Normal View History

2024-05-11 12:51:20 +02:00
// types
2024-05-14 02:18:42 +02:00
import type * as interfaces from '../dist_ts_interfaces/index.js';
2024-05-11 12:51:20 +02:00
export type {
interfaces
}
// ====================================
// imports
// ====================================
2024-05-25 01:28:56 +02:00
import { logger } from './logging.js';
2024-05-11 12:51:20 +02:00
logger.log('note', 'mainthread console initialized!');
2024-05-25 01:28:56 +02:00
import { ServiceworkerClient } from './classes.serviceworkerclient.js';
2024-05-11 12:51:20 +02:00
export type {
2024-05-25 02:35:23 +02:00
ServiceworkerClient
2024-05-11 12:51:20 +02:00
}
2024-05-25 02:34:43 +02:00
export const getServiceworkerClient = async () => {
const swClient = await ServiceworkerClient.createServiceWorker(); // lets setup the service worker
2024-05-11 12:51:20 +02:00
logger.log('ok', 'service worker ready!'); // and wait for it to be ready
2024-05-25 02:34:43 +02:00
return swClient;
2024-05-11 12:51:20 +02:00
};