Skip to content

InputMap

InputMap = Record<string, unknown[]>

Defined in: types.ts:249

Constraint for input payload maps: input name → argument tuple.

An empty tuple means the input carries no payload.

type TrafficLightInputs = {
  timeout: [];
  emergency: [event: { severity: number }];
};

const light = createFsm<TrafficLightInputs>()({ ... });
light.handle("emergency", { severity: 5 }); // payload enforced