StoreOptions
export type StoreOptions = { decisions: (DecisionSource | string)[]; schemas: SchemaSource[]; resolver?: (moduleName: string) => Promise<string>;};
Attributes
༶ decisions
: (DecisionSource | string)[]
A list of data sources to load decision data from.
Values of type string
are treated as paths. Both relative paths (relative to the current working directory) and absolute paths are accepted.
Values of type DecisionSource define a data source. The definitions for Designer Decisions Sample and Demo Data can be imported from @noodlestan/designer-decisions
.
import { DEMO_DATA, SAMPLE_DATA } from '@noodlestan/designer-decision';
༶ schemas
: (optional) SchemaSource[]
A list of schema configurations to load JSON schemas from.
The definition for the built-in schemas are always loaded automatically.
import { DECISION_SCHEMAS } from '@noodlestan/designer-schemas';
༶ resolver
: (optional) (name: string) => Promise<string>
A function to resolve the physical location of packages containing decisions sources or schemas defined by DecisionSource and SchemaSource references of type package
.
If one isn’t provided, the default will be used. It uses resolve() under the hood and is able to locate the package in most scenarios, including complex monorepos.
Usage
See the examples in staticStoreBuilder().