9 lines
No EOL
255 B
TypeScript
9 lines
No EOL
255 B
TypeScript
import * as Comlink from 'comlink';
|
|
|
|
import type { PowWorker } from './workers/pow.worker';
|
|
|
|
const powWorker = Comlink.wrap<typeof PowWorker>(
|
|
new Worker(new URL('./workers/pow.worker.ts', import.meta.url), { type: 'module' }),
|
|
);
|
|
|
|
export { powWorker }; |