Skip to content

WorkerComponentConstructorParams<TApi>

Parameters of WorkerComponent.

Import:

import type { WorkerComponentConstructorParams } from '@mnaoumov/obsidian-lib/components/worker-component';

Signature:

export interface WorkerComponentConstructorParams<TApi extends WorkerApi<TApi>>

Properties

PropertyTypeDescription
fallbackHandlers?WorkerApiHandlers<TApi>The same handlers the worker exposes, run on the main thread when no Worker can be created. Without them, a failure to create the worker fails the component's load.
name?stringThe worker's name, shown by the developer tools.
sourcestringThe bundled worker source: the string a *.worker.ts?worker-source import gives with @mnaoumov/obsidian-dev-toolkit's workers feature.