Skip to content

StateNamesOf

StateNamesOf<TStates> = keyof TStates & string

Defined in: types.ts:33

Extracts state names as a string literal union from a states config object.

TStates

type S = StateNamesOf<{ green: {...}, yellow: {...}, red: {...} }>;
// => "green" | "yellow" | "red"