Slice
@rotorsoft/act-root / act/src / Slice
Type Alias: Slice<TSchemaReg, TEvents, TActions, TStateMap, TActor, TLanes>
Slice<
TSchemaReg,TEvents,TActions,TStateMap,TActor,TLanes> =object
Defined in: libs/act/src/types/builders.ts:974
A self-contained functional slice grouping partial states with their
scoped reactions. Slices are composed into an Act orchestrator via
act().withSlice(slice).
Type Parameters
TSchemaReg
TSchemaReg extends SchemaRegister<TActions>
Schema register for states
TEvents
TEvents extends Schemas
Event schemas from this slice's states
TActions
TActions extends Schemas
Action schemas from this slice's states
TStateMap
TStateMap extends Record<string, Schema> = { }
Map of state names to state schemas
TActor
Actor type extending base Actor
TLanes
TLanes extends string = typeof DEFAULT_LANE
Properties
_tag
readonly_tag:"Slice"
Defined in: libs/act/src/types/builders.ts:982
events
readonlyevents:EventRegister<TEvents>
Defined in: libs/act/src/types/builders.ts:984
lanes
readonlylanes:ReadonlyArray<LaneConfig>
Defined in: libs/act/src/types/builders.ts:992
Drain lanes declared on this slice via .withLane(...).
act().withSlice(slice) merges these into the Act's lane set so
.to({lane}) is statically checked at the slice's call site against
the lanes the slice itself declared.
projections
readonlyprojections:ReadonlyArray<Projection<any>>
Defined in: libs/act/src/types/builders.ts:985
states
readonlystates:Map<string,State<any,any,any>>
Defined in: libs/act/src/types/builders.ts:983