import { AnyCodec, Input, Output } from "../common/codec.js"; import { Codec, Expand, Narrow } from "../common/mod.js"; import { InputObject, ObjectMembers, OutputObject } from "./object.js"; export declare class Variant { readonly tag: T; readonly codec: Codec; constructor(tag: T, codec: Codec); } export type AnyVariant = Variant; export declare function variant(tag: T, ...members: ObjectMembers): Variant, OutputObject>; export type InputTaggedUnion> = { [I in keyof M]: Expand["tag"]>> & Input["codec"]>>; }[keyof M & number]; export type OutputTaggedUnion> = { [I in keyof M]: Expand["tag"]> & Output["codec"]>>; }[keyof M & number]; export declare function taggedUnion>>(tagKey: K, members: M): Codec, OutputTaggedUnion>; export declare function literalUnion(members: Record): Codec;