Skip to main content

Function: reduceCastHandoff()

function reduceCastHandoff(state: CastHandoffState, event: CastHandoffEvent): CastHandoffTransition;

Defined in: packages/cast/src/handoff-machine.ts:499

The §3 machine as a pure transition function. Events that are meaningless in the current phase are ignored (state unchanged, no effects) — remote surfaces and platform callbacks fire at times the machine cannot forbid, so "ignore what cannot apply" is the safe contract; every meaningful cell is handled explicitly below and exercised by the unit suite.

Parameters

ParameterType
stateCastHandoffState
eventCastHandoffEvent

Returns

CastHandoffTransition