wasmModule is an already-compiled module the caller shares across
workers (see wasm/shared-module.ts); omitted, the worker compiles its
own. Declaring it here is safe for the SORT worker too: a function with
fewer parameters still satisfies a wider signature in TypeScript, so its
1-argument initialize continues to match.
OptionalwasmPath: stringOptionalwasmModule: Module
The only shape this guard needs from a Comlink-wrapped worker API. Structural on purpose: the data worker and the SORT worker both expose an
initialize(wasmPath?), and sharing this guard is what keeps their startup semantics from drifting apart (the sort coordinator used to hand-roll its own race, and its copy never grew theonmessageerrorarm or thepreventDefault).