UNPKG

computed-types

Version:

Runtime validation types for TypeScript.

6 lines (5 loc) 347 B
import { Primitive } from './utils'; import FunctionType from './FunctionType'; export declare type SwitchKey = [string, Map<Primitive, number>]; export declare function findSwitchKey(...candidates: [unknown, ...unknown[]]): SwitchKey | null; export declare function generateSwitch(switchKey: SwitchKey, validators: FunctionType[]): FunctionType;