Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    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 the onmessageerror arm or the preventDefault).

    interface GuardedInitApi<TResult> {
        initialize(wasmPath?: string, wasmModule?: Module): Promise<TResult>;
    }

    Type Parameters

    • TResult
    Index
    • 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.

      Parameters

      • OptionalwasmPath: string
      • OptionalwasmModule: Module

      Returns Promise<TResult>