EngineOptions

API / publicodes / EngineOptions

type EngineOptions = object;

Defined in: packages/core/src/engine/types.ts:104

Options for the engine constructor

Properties

allowOrphanRules?

optional allowOrphanRules?: boolean;

Defined in: packages/core/src/engine/types.ts:110

Don’t throw an error if the parent of a rule is not found. This is useful to parse partial rule sets (e.g. optimized ones).

Deprecated

Use the strict: { parentRule: false } option instead


flag?

optional flag?: FlagOptions;

Defined in: packages/core/src/engine/types.ts:134

flag to enable new experimental features


getUnitKey?

optional getUnitKey?: getUnitKey;

Defined in: packages/core/src/engine/types.ts:129

Experimental

getUnitKey is a function that allows to normalize the unit in the engine.


logger?

optional logger?: Logger;

Defined in: packages/core/src/engine/types.ts:123

The logger used to log errors and warnings (default to console).


strict?

optional strict?: boolean | StrictOptions;

Defined in: packages/core/src/engine/types.ts:117

Whether the engine should trigger an error when it detects an anomaly, or whether it should simply record it and continue.

This option can be set globally (true or false) or for specific rules (StrictOptions).


warn?

optional warn?: boolean | WarnOptions;

Defined in: packages/core/src/engine/types.ts:139

Specify which warnings should be enabled