declare type Union = { [Literal in Discriminant]: string; }; export declare type TagUnion = Union<'tag'>; export declare type InferMatch, Type extends ADT[Discriminant]> = Extract; declare type ExhaustivePattern, A> = { [Kind in ADT[Discriminant]]: (m: InferMatch) => A; }; declare type CatchAll, A> = { _: (adt: ADT) => A; }; declare type PartialPattern, A> = Partial> & CatchAll; export declare type Pattern, A> = ExhaustivePattern | PartialPattern; export declare const genericMatch: (d: Discriminant) => , A>(adt: ADT, pattern: Pattern) => A; export declare const match: , A>(adt: ADT, pattern: Pattern<"tag", ADT, A>) => A; export declare const match_: , A>(pattern: Pattern<"tag", ADT, A>) => (adt: ADT) => A; export declare type OmitFrom, Type extends ADT[Discriminant], Key extends keyof any> = Omit, Key>; export declare type OmitFromAll, Key extends keyof any> = { [Tag in ADT[Discriminant]]: OmitFrom; }[ADT[Discriminant]]; export declare type OmitFromTag, Tag extends ADT['tag'], Key extends keyof any> = OmitFrom<'tag', ADT, Tag, Key>; export declare type OmitFromAllTags, Key extends keyof any> = OmitFromAll<'tag', ADT, Key>; export {};