25 lines
656 B
TypeScript
25 lines
656 B
TypeScript
// types
|
|
import type * as interfaces from '../dist_ts_interfaces/index.js';
|
|
export type {
|
|
interfaces
|
|
}
|
|
|
|
// ====================================
|
|
// imports
|
|
// ====================================
|
|
|
|
import { logger } from './logging.js';
|
|
logger.log('note', 'mainthread console initialized!');
|
|
|
|
import { ServiceworkerClient } from './classes.serviceworkerclient.js';
|
|
|
|
export type {
|
|
ServiceworkerClient
|
|
}
|
|
|
|
export const getServiceworkerClient = async () => {
|
|
const swClient = await ServiceworkerClient.createServiceWorker(); // lets setup the service worker
|
|
logger.log('ok', 'service worker ready!'); // and wait for it to be ready
|
|
return swClient;
|
|
};
|