UNPKG

@ghostry/finity-solidjs

Version:

Finite state management with exhaustiveness and transition enforcement for TypeScript.

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