import { type ComputedTypeError, type Builder, type FixDeepFunctionInfer, type IsEqual } from "../../common"; import { type ComplexMatchedValue, type ComplexUnMatchedValue, type Pattern, type PatternValue } from "../types"; export interface BuilderMatcher { isMatch(value: unknown): boolean; theFunction(value: unknown): unknown; } export interface MatchBuilderDefinition { input: unknown; matchers: BuilderMatcher[]; } export interface MatchBuilder extends Builder { with, GenericOutput extends unknown>(pattern: FixDeepFunctionInfer, GenericPattern>, theFunction: (value: ComplexMatchedValue>) => GenericOutput): MatchBuilder>, GenericOutput | GenericResult>; when(predicate: (input: GenericValue) => input is GenericPredicatedInput, theFunction: (predicatedInput: GenericPredicatedInput) => GenericOutput): MatchBuilder, GenericOutput | GenericResult>; when(predicate: (input: GenericValue) => boolean, theFunction: (predicatedInput: GenericValue) => GenericOutput): MatchBuilder; whenNot(predicate: (input: GenericValue) => input is GenericPredicatedInput, theFunction: (predicatedInput: Exclude) => GenericOutput): MatchBuilder, GenericOutput | GenericResult>; whenNot(predicate: (input: GenericValue) => boolean, theFunction: (predicatedInput: GenericValue) => GenericOutput): MatchBuilder; exhaustive: IsEqual extends true ? () => GenericResult : (ComputedTypeError<"Pattern are not exhaustive."> & { restValue: GenericValue; }); otherwise(theFunction: (value: GenericValue) => GenericOtherwiseResult): GenericResult | GenericOtherwiseResult; } declare const InvalidExhaustivePatternError_base: new (params: { "@DuplojsUtilsError/invalid-exhaustive-pattern-error"?: unknown; }, parentParams: readonly [message?: string | undefined, options?: ErrorOptions | undefined]) => Error & import("../../common").Kind, unknown> & import("../../common").Kind, unknown>; export declare class InvalidExhaustivePatternError extends InvalidExhaustivePatternError_base { input: unknown; constructor(input: unknown); } export declare const matchBuilder: import("../../common").BuilderHandler & Pick, "exhaustive">>; export {};