Skip to content

This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.

WorkerEngineOptions

Defined in: packages/engine/src/worker/client.ts:49

Configuration for createWorkerEngine.

optional config?: EngineConfigOverride;

Defined in: packages/engine/src/worker/client.ts:59

Config overrides, merged per section over the defaults worker-side.


optional diagnostics?: boolean;

Defined in: packages/engine/src/worker/client.ts:55

Whether the worker builds its engine with diagnostics enabled.


optional formatting?: FormattingOverrides;

Defined in: packages/engine/src/worker/client.ts:69

Formatting the worker writes a DTO’s display text with, merged group by group over the worker engine’s own settings (its calendar and its locale’s numbers). A calendar backend cannot cross the boundary; give it to the worker runtime instead.


optional localeCode?: string;

Defined in: packages/engine/src/worker/client.ts:53

Locale for keywords and number formatting; defaults to English worker-side.


optional packages?: string[];

Defined in: packages/engine/src/worker/client.ts:67

Names of built-in packages the worker should register. Omitted registers them all. Names rather than the packages themselves, since a package carries functions that cannot cross a postMessage boundary; a host with a custom package bakes it into its own worker entry and selects it here by name.


optional random?: {
seed: string | number;
};

Defined in: packages/engine/src/worker/client.ts:57

A seed for reproducible random draws, as the engine’s own random option.

seed: string | number;

transport: WorkerTransport;

Defined in: packages/engine/src/worker/client.ts:51

The channel to the worker runtime. See worker/transport.ts for adapters.