UNPKG

ts-sum-types

Version:

Algebraic sum types for TypeScript, designed after Rust's enums

7 lines (6 loc) 191 B
import { TagArrayMap } from './util'; export interface Matchable<Map extends TagArrayMap> { match(fns: { [TTag in keyof Map]: (...value: Map[TTag]) => void; }): void; }