import { Opt } from "@effect-ts-app/core/Option"; import * as D from "@effect-ts/core/Collections/Immutable/Dictionary"; import type { EnforceNonEmptyRecord, Unify } from "@effect-ts/core/Utils"; import * as S from "../_schema.js"; import type { DefaultSchema } from "./withDefaults.js"; export interface MatchS, AS> { , x1: S.ParsedShapeOf) => Result; }, Result>(mat: M, def: (x0: { [K in keyof Props]: S.ParsedShapeOf; }[Exclude], x1: { [K in keyof Props]: S.ParsedShapeOf; }[Exclude]) => Result): (ks: AS) => Result; (mat: { [K in keyof Props]: (_: S.ParsedShapeOf, __: S.ParsedShapeOf) => Result; }): (ks: AS) => Result; } export interface MatchW, AS> { , __: S.ParsedShapeOf) => any; }, Result>(mat: M, def: (x0: { [K in keyof Props]: S.ParsedShapeOf; }[Exclude], x1: { [K in keyof Props]: S.ParsedShapeOf; }[Exclude]) => Result): (ks: AS) => Unify<{ [K in keyof M]: M[K] extends (_: S.ParsedShapeOf, __: S.ParsedShapeOf) => any ? ReturnType : never; }[keyof M] | Result>; , __: S.ParsedShapeOf) => any; }>(_: M): (ks: AS) => Unify<{ [K in keyof M]: ReturnType; }[keyof M]>; } export interface UnionApi> extends S.ApiSelfType { readonly matchS: MatchS; }[keyof Props]>>; readonly matchW: MatchW; }[keyof Props]>>; } export type SchemaUnion> = DefaultSchema; }[keyof Props], { [k in keyof Props]: S.ParsedShapeOf; }[keyof Props], { [k in keyof Props]: S.EncodedOf; }[keyof Props], UnionApi>; export declare const unionIdentifier: S.Annotation<{ props: Record; tag: Opt<{ key: string; index: D.Dictionary; reverse: D.Dictionary; values: readonly string[]; }>; }>; export declare function union>(props: Props & EnforceNonEmptyRecord): SchemaUnion; //# sourceMappingURL=union.d.ts.map