Skip to content
Sheetwrite

Sheetwrite / Documentation

createWorkerMessageHandler@sheetwrite/core/worker

Build the worker-side protocol handler.

Build the worker-side protocol handler. Keeping the mutable render state inside the returned closure lets tests exercise the real message contract without booting a browser Worker.

Declaration

function createWorkerMessageHandler(
postAcknowledgement: (message: WorkerAcknowledgement) => void,
): (message: unknown) => void