import { ElemType, ExtractUnion, ExcludeUnion } from './utils'; import * as M from './monocle'; import * as Ma from './matcher'; import * as PU from './predicates'; import * as CU from './ctors'; export declare type Tagged = { [t in Tag]: string; }; export interface ADT extends Ma.Matchers, PU.Predicates, CU.Ctors, M.MonocleFor { select: (keys: Keys) => ADT>, Tag>; exclude: (keys: Keys) => ADT>, Tag>; tag: Tag; keys: KeysDefinition; } export declare type ADTType> = CU.CtorType; export declare const keepKeys: , Tag extends string>(a: KeysDefinition, toKeep: string[]) => object; export declare const unionADT: , ADT, ...ADT[]]>(as: AS) => ADT, AS[number]["tag"]>; export declare const intersectADT: , B extends Tagged, Tag extends string>(a: ADT, b: ADT) => ADT, Tag>; export declare type KeysDefinition = { [k in A[Tag] & string]: any; }; export declare const isIn: (keys: KeysDefinition) => (k: string) => boolean; interface TypeDef { _TD: T; } export declare const ofType: () => TypeDef; export declare const makeADT: (tag: Tag) => ; }>(_keys: R) => ADT; export {};