Skip to main content
Version: Current

Load

@rotorsoft/act-root


@rotorsoft/act-root / act/src / Load

Type Alias: Load

Load = object

Defined in: libs/act/src/types/action.ts:415

One .loads(...) of an action: another state the decision needs, at the stream target names, and the events of that state the action may emit to that stream. A load without events is a read: nothing is appended to its stream, and it isn't guarded.

Built by the state builder; resolved to the registered state by act().build().

Properties​

events​

readonly events: readonly string[]

Defined in: libs/act/src/types/action.ts:424

The loaded state's events the action may emit to that stream.


name​

readonly name: string

Defined in: libs/act/src/types/action.ts:426

The key of this load in loaded: the load's name, or the state's.


state​

readonly state: State<any, any, any>

Defined in: libs/act/src/types/action.ts:417

The loaded state; after build, the one registered under its name.


target​

readonly target: (payload, state) => string | undefined

Defined in: libs/act/src/types/action.ts:422

The stream to load, from the payload and the action's state; undefined skips this load.

Parameters​

payload​

any

state​

any

Returns​

string | undefined