import type { IrType, IrPrimitiveType } from "../types/index.js";
import type { DiagnosticCode } from "../../types/diagnostic.js";
import type { TypeId } from "./internal/universe/types.js";
import type { TypeSystemState } from "./type-system-state-model.js";
import type { Site } from "./type-system-state-types.js";
export declare const emitDiagnostic: (state: TypeSystemState, code: DiagnosticCode, message: string, site?: Site) => void;
export declare const makeMemberCacheKey: (fqName: string, memberName: string, typeArgs?: readonly IrType[]) => string;
/**
 * Create a cache key for nominal lookup.
 */
export declare const makeNominalLookupKey: (fqName: string, typeArgs: readonly IrType[], memberName: string) => string;
export declare const isNullishPrimitive: (t: IrType) => t is IrPrimitiveType & {
    name: "null" | "undefined";
};
export declare const addUndefinedToType: (type: IrType) => IrType;
/**
 * Resolve a surface name to a canonical TypeId.
 *
 * Order:
 * 1) AliasTable (primitives/globals/System.* canonicalization)
 * 2) UnifiedTypeCatalog source-authored tsName
 * 3) UnifiedTypeCatalog assembly tsName
 * 4) UnifiedTypeCatalog by clrName
 *
 * Canonical aliases must win over source-authored global wrapper declarations.
 * Example:
 * - source `interface String extends String$instance, __String$views {}`
 * - canonical alias `String -> System.String`
 *
 * Member lookup on `string` / `String` must resolve against the canonical CLR
 * entry so instance members like `IndexOf` and `Substring` remain available.
 *
 * IMPORTANT (airplane-grade):
 * Resolution must be arity-aware when type arguments are present. Facade
 * types often omit the `_N` generic arity suffix (e.g. `IList<T>` is a
 * facade over `IList_1<T>`). When `arity` is provided and the direct
 * resolution doesn't match, we deterministically try `<name>_<arity>`.
 */
export declare const resolveTypeIdByName: (state: TypeSystemState, name: string, arity?: number) => TypeId | undefined;
export declare const resolveSourceReferenceFQName: (state: TypeSystemState, type: Extract<IrType, {
    kind: "referenceType";
}>) => string | undefined;
/**
 * Normalize a receiver type to nominal form for member lookup.
 *
 * Phase 6: Returns TypeId + typeArgs for TypeId-based NominalEnv.
 *
 * ALICE'S RULE R3: Primitive-to-nominal bridging is part of TypeSystem.
 */
export declare const normalizeToNominal: (state: TypeSystemState, type: IrType) => {
    typeId: TypeId;
    typeArgs: readonly IrType[];
} | undefined;
export declare const stripTsonicExtensionWrappers: (type: IrType) => IrType;
export declare const stripNullishForInference: (type: IrType) => IrType | undefined;
//# sourceMappingURL=type-system-state-helpers.d.ts.map