/**
 * Anonymous Type Shape Analysis — Collectors & Type Utilities
 *
 * Type parameter collection, referenced type name collection, reachability
 * analysis, and nullish type stripping/addition. Split from
 * anon-type-shape-analysis.ts for file-size compliance.
 */
import type { IrType, IrClassDeclaration, IrModule, IrPropertySignature } from "../types.js";
/**
 * Collect free type parameter names referenced by an IrType.
 *
 * These are used to make synthesized anonymous types generic when their
 * member types contain typeParameterType nodes (e.g., `{ value: T }`).
 */
type CollectTypeParameterState = {
    readonly seen: WeakSet<object>;
};
export declare const collectTypeParameterNames: (type: IrType, out: Set<string>, state?: CollectTypeParameterState) => void;
export declare const collectReferencedTypeNames: (type: IrType | undefined, out: Set<string>, seen?: WeakSet<object>) => void;
export declare const collectPubliclyReachableAnonymousTypes: (modules: readonly IrModule[], generatedDeclarations: readonly IrClassDeclaration[]) => ReadonlySet<string>;
/**
 * Extract the non-undefined/null type from a union type.
 * For `T | undefined` or `T | null | undefined`, returns T.
 * For non-union types, returns the type as-is.
 */
export declare const stripNullishFromType: (type: IrType) => IrType;
export declare const stripUndefinedFromType: (type: IrType) => IrType;
export declare const normalizeStructuralPropertySignature: (member: IrPropertySignature) => IrPropertySignature;
/**
 * Ensure a type includes `undefined` (for optional members).
 *
 * Optional properties in TS (`foo?: T`) can carry optionality via a flag,
 * not as an explicit `T | undefined` union in IR. When we synthesize a named
 * type for an anonymous object, we must preserve optionality by materializing
 * `undefined` into the type.
 */
export declare const addUndefinedToType: (type: IrType) => IrType;
export {};
//# sourceMappingURL=anon-type-shape-collectors.d.ts.map