UNPKG

@ghostry/finity-reactjs

Version:

Finite state management with exhaustiveness and transition enforcement for TypeScript.

10 lines (9 loc) 367 B
import { type ExhaustiveSwitch, type Getter } from '@ghostry/finity-core'; import type { Config } from './Types'; type EffectSwitch<S extends { kind: string; }, C extends S['kind']> = ExhaustiveSwitch<void, S, C>; declare const _default: (_config: Config) => <S extends { kind: string; }>(state: Getter<S>) => EffectSwitch<S, never>; export default _default;