Type Alias State<D, P, G, E>
State<D, P, G, E>: { effect?: [E] extends [never] ? "Error: Effects are not defined." : IsStringLiteral<E> extends false ? "Error: Effects must be literal strings." : Definition.Effect<E>; on?: On<D, [...P, "on"], G>; } Type Parameters
- D
- P extends ReadonlyArray<keyof any>
- G extends string
- E extends string
Type declaration
Optional
Readonly
effect?: [E] extends [never]
? "Error: Effects are not defined."
: IsStringLiteral<E> extends false
? "Error: Effects must be literal strings."
: Definition.Effect<E>
Optional
Readonly
on?: On<D, [...P, "on"], G>
The state definition.