/** * Type simplification for Dvala's set-theoretic type system. * * Inference produces correct but often unreadable types. Simplification * normalizes them for better error messages and display. * * Steps: * 1. Flatten nested unions/intersections * 2. Remove redundant members (Never in unions, Unknown in intersections) * 3. Collapse disjoint intersections to Never * 4. Absorb subtypes in unions (Number | 42 → Number) * 5. Collapse trivial negations (Number & !String → Number when disjoint) */ import type { Type } from './types'; /** * Simplify a type to a normalized, more readable form. * Does not change the type's meaning — only its representation. */ export declare function simplify(t: Type): Type;