/**
 * Typeof narrowing resolvers.
 *
 * Type-level narrowing helpers for typeof checks and shared utilities
 * (unwrapExpr, getStringLiteralText, equality/inequality operators,
 * makeTypeNarrowing, extractArrayIsArrayTarget, extractIdentifierPropertyAccess,
 * tryResolveCallPredicateNarrowing).
 */
import * as ts from "typescript";
import type { ProgramContext } from "../program-context.js";
import type { IrType } from "../types.js";
import type { DeclId } from "../type-system/index.js";
import { type AccessPathTarget } from "./access-paths.js";
export type BoundDecl = DeclId;
export type TypeNarrowing = {
    readonly kind: "decl";
    readonly declId: number;
    readonly targetType: IrType;
} | {
    readonly kind: "accessPath";
    readonly key: string;
    readonly targetType: IrType;
};
export declare const unwrapExpr: (expr: ts.Expression) => ts.Expression;
export declare const getStringLiteralText: (expr: ts.Expression) => string | undefined;
export declare const isEqualityOperator: (kind: ts.SyntaxKind) => boolean;
export declare const isInequalityOperator: (kind: ts.SyntaxKind) => boolean;
export declare const makeTypeNarrowing: (target: AccessPathTarget, targetType: IrType) => TypeNarrowing;
export declare const extractArrayIsArrayTarget: (expr: ts.Expression, ctx: ProgramContext) => AccessPathTarget | undefined;
export declare const tryResolveCallPredicateNarrowing: (expr: ts.Expression, ctx: ProgramContext, whenTruthy: boolean) => TypeNarrowing | undefined;
export declare const extractIdentifierPropertyAccess: (value: ts.Expression, ctx: ProgramContext) => {
    declId: BoundDecl;
    propertyName: string;
} | undefined;
export declare const genericTypeofTarget: (tag: string) => IrType | undefined;
export declare const matchesResolvedTypeofTag: (type: IrType, tag: string) => boolean;
export declare const filterTypeByResolvedCandidates: (currentType: IrType, predicate: (candidate: IrType) => boolean, ctx: ProgramContext) => IrType | undefined;
export declare const narrowTypeByTypeofTag: (currentType: IrType | undefined, tag: string, ctx: ProgramContext) => IrType | undefined;
export declare const narrowTypeByNotTypeofTag: (currentType: IrType | undefined, tag: string, ctx: ProgramContext) => IrType | undefined;
export declare const tryResolveTypeofNarrowing: (expr: ts.Expression, ctx: ProgramContext, whenTruthy: boolean) => TypeNarrowing | undefined;
//# sourceMappingURL=narrowing-resolvers-typeof.d.ts.map