/** * Shared guard-detection primitives used by both ternary guard analysis * (core/semantic/ternary-guards.ts) and if-statement guard analysis * (statements/control/conditionals/guard-analysis.ts). * * These are pure helpers with no emission imports — they only depend on * IR types, EmitterContext, and peer core/semantic modules. */ import { IrType } from "@tsonic/frontend"; import { EmitterContext, LocalTypeInfo } from "../../types.js"; /** * Resolve a reference type's LocalTypeInfo map (possibly from a different module). * * This is required for airplane-grade narrowing features that depend on member *types* * (not just member names), e.g. discriminant literal equality checks. */ export declare const resolveLocalTypesForReference: (type: Extract, context: EmitterContext) => ReadonlyMap | undefined; /** * Extract the set of allowed discriminant literal values from a type. * * Airplane-grade rule: * - The discriminant property must be typed as a literal or a union of literals. * - If it includes any non-literal members (including null/undefined), we refuse to treat * it as a discriminant for equality-guard narrowing. */ export declare const tryGetLiteralSet: (type: IrType, context: EmitterContext) => ReadonlySet | undefined; //# sourceMappingURL=guard-primitives.d.ts.map