import { type ComplexMatchedPrimitive } from "./primitive"; import { type ComplexMatchedObject } from "./object"; import { type ComplexMatchedArray } from "./array"; import { type PatternValueMaybeAll } from "../pattern"; import { type ComplexMatchedMaybeAll } from "./maybeAll"; import { type ComplexMatchedFunction } from "./function"; import { type AnyValue, type IsEqual } from "../../../common"; export type ComplexMatchedValue = (IsEqual extends true ? AnyValue : GenericInput) extends infer InferredInput ? Exclude extends infer InferredPatternValue ? (ComplexMatchedPrimitive | ComplexMatchedObject | ComplexMatchedArray | ComplexMatchedFunction | ComplexMatchedMaybeAll) : never : never;