Skip to content

@ue-too/being / EventResult

Type Alias: EventResult<States, Output>

EventResult<States, Output> = EventNotHandled | EventHandled<States, Output>

Defined in: interface.ts:159

Discriminated union representing the result of event handling.

Type Parameters

States

States extends string

Union of all possible state names

Output

Output = void

The output type for handled events

Remarks

Every event handler returns an EventResult, which is either:

Use the handled discriminant to narrow the type in TypeScript.