Skip to content

@ue-too/board / index / KmtInputStateMachineExpansion

Type Alias: KmtInputStateMachineExpansion()<E, C, S, O> ​

KmtInputStateMachineExpansion<E, C, S, O> = (stock, extend) => Record<S, State<E, C, S, O>>

Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-state-machine.ts:814

The callback expandKmtInputStateMachine calls with the stock states.

Type Parameters ​

E ​

E extends KmtInputEventMapping

C ​

C extends KmtInputContext

S ​

S extends string

O ​

O extends KmtInputEventOutputMapping & Partial<Record<keyof E, unknown>>

Parameters ​

stock ​

Record<KmtInputStates, State<E, C, S, O>>

extend ​

StateExtender<E, C, S, O>

Returns ​

Record<S, State<E, C, S, O>>

Remarks ​

stock holds every built-in KMT state already typed for the expanded machine; extend is createStateExtender bound to the same generics. Return the full state map for the expanded machine, typically { ...stock, ...changes }.