UNPKG

@xylabs/threads

Version:

Web workers & worker threads as simple as a function call

7 lines 408 B
/** Minimal interface representing the global scope inside a web worker. */ export interface WorkerGlobalScope { addEventListener(eventName: string, listener: (event: Event) => void): void; postMessage(message: unknown, transferList?: readonly Transferable[]): void; removeEventListener(eventName: string, listener: (event: Event) => void): void; } //# sourceMappingURL=WorkerGlobalScope.d.ts.map