abslink
v1.1.6
Published
IPC for abstract message channels, comlink style.
Readme
comlink for abstract IPC
import { expose } from 'abslink'
export default expose({
add: (a: number, b: number) => a + b
})and
import { wrap } from 'comlink'
import worker from './exposed.ts?worker'
import type Maths from './exposed.ts'
const threaded = wrap<Maths>(worker)
const res = await threaded.add(1, 3) // 4