import type { CBORSchemaType } from "./type.js"; /** * Creates a schema for union types that can be one of several types * * @template Schemas Array of possible schemas * @param schemas Array of schemas that the value might conform to * * @example * ```typescript * import { cs } from "../cbor_schema.ts"; * const numberOrStringSchema = cs.union([ * cs.float, * cs.string * ]); * const encoded1 = cs.toCBOR(numberOrStringSchema, 42); * const encoded2 = cs.toCBOR(numberOrStringSchema, "hello"); * const decoded1 = cs.fromCBOR(numberOrStringSchema, encoded1); // 42 * const decoded2 = cs.fromCBOR(numberOrStringSchema, encoded2); // "hello" * ``` */ export declare function union[]>(schemas: Schemas): CBORSchemaType ? T : never>; //# sourceMappingURL=union.d.ts.map