UNPKG

pivots

Version:

## Readable [discriminated unions](https://www.typescriptlang.org/docs/handbook/advanced-types.html#discriminated-unions) for TypeScript

35 lines (34 loc) 646 B
import { PivotsType } from './index'; declare type Actions<R> = PivotsType<R>; export declare type CounterAction = Actions<{ reset: {}; increment: { by: number; }; decrement: { by: number; }; multiply: { by: number; }; }>; export declare type TodoListAction = Actions<{ addItem: { id: string; title: string; }; removeItem: { id: string; }; moveItem: { id: string; afterID?: string; }; completeItem: { id: string; }; uncompleteItem: { id: string; }; }>; export {};