import { ValidationFailure } from '../error'; import { GetCastType, GetSrcType, Validator } from '../interface'; import { Simplify } from '../util'; export type GetTaggedUnionCast = Simplify<{ [C in keyof U]: GetCastType & { [T in F]: C; }; }[keyof U]>; export type GetTaggedUnionSrc = Simplify<{ [C in keyof U]: GetSrcType & { [T in F]: C; }; }[keyof U]>; export declare class TaggedUnion>> implements Validator, GetTaggedUnionSrc> { readonly tagField: F; readonly variants: U; private wrongTagMessage; constructor(tagField: F, variants: U); cast(value: any): ValidationFailure | GetTaggedUnionCast; validate(value: unknown): ValidationFailure | undefined; private getVariant; phantom(): GetTaggedUnionSrc; } //# sourceMappingURL=tagged-union.d.ts.map