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.

InitMessage

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

Build the worker engine, sent once before any request.

optional config?: EngineConfigOverride;

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

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


optional diagnostics?: boolean;

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

Whether to build the engine with its diagnostic pipeline enabled.


optional formatting?: FormattingOverrides;

Defined in: packages/engine/src/worker/protocol.ts:66

Formatting the runtime 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), as engine.formatValue merges them.


id: number;

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


kind: "init";

Defined in: packages/engine/src/worker/protocol.ts:50


optional localeCode?: string;

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

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


optional packages?: string[];

Defined in: packages/engine/src/worker/protocol.ts:64

Names of built-in packages to register, resolved against the runtime’s available set. Omitted registers them all. Names rather than the packages themselves, since an IEnginePackage carries functions that cannot cross a postMessage boundary.


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

Defined in: packages/engine/src/worker/protocol.ts:68

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

seed: string | number;