/**
 * Binding Layer — Pure Helper Functions
 *
 * Module-level helper functions used by the binding factory.
 * These exist outside the createBinding() closure and are pure functions
 * that operate on TypeScript AST nodes.
 */
import ts from "typescript";
import type { DeclKind, ParameterNode, TypeParameterNode, SignatureTypePredicate, ClassMemberNames } from "../type-system/internal/handle-types.js";
import type { ParameterMode } from "../type-system/types.js";
export declare const getTypeNodeFromDeclaration: (decl: ts.Declaration) => ts.TypeNode | undefined;
export declare const getMemberTypeAnnotation: (decl: ts.Declaration) => ts.TypeNode | undefined;
export declare const getDeclKind: (decl: ts.Declaration) => DeclKind;
export declare const getReturnTypeNode: (decl: ts.SignatureDeclaration | undefined) => ts.TypeNode | undefined;
export declare const isThisParameter: (p: ts.ParameterDeclaration) => boolean;
export declare const extractThisParameterTypeNode: (decl: ts.SignatureDeclaration | undefined) => ts.TypeNode | undefined;
/**
 * Extract and normalize parameter nodes from a signature declaration.
 *
 * ALICE'S SPEC: Parameter mode detection happens HERE during signature registration.
 * If the parameter type is `ref<T>`, `out<T>`, or `in<T>`:
 * - Set `mode` to that keyword
 * - Set `typeNode` to the INNER T node (unwrapped)
 *
 * This is PURE SYNTAX inspection, no TS type inference.
 */
export declare const extractParameterNodes: (decl: ts.SignatureDeclaration | undefined) => readonly ParameterNode[];
/**
 * Normalize a parameter type node by detecting ref<T>/out<T>/in<T> wrappers.
 *
 * This is PURE SYNTAX analysis - we look at the TypeNode AST structure:
 * - If it's a TypeReferenceNode with identifier name "ref"/"out"/"in"
 * - And exactly one type argument
 * - Then unwrap to get the inner type
 *
 * @param typeNode The parameter's type node
 * @returns { mode, typeNode } where typeNode is unwrapped if wrapper detected
 */
export declare const normalizeParameterTypeNode: (typeNode: ts.TypeNode | undefined) => {
    mode: ParameterMode;
    typeNode: ts.TypeNode | undefined;
};
export declare const convertTypeParameterDeclarations: (typeParameters: readonly ts.TypeParameterDeclaration[] | undefined) => readonly TypeParameterNode[] | undefined;
export declare const extractTypeParameterNodes: (decl: ts.SignatureDeclaration | undefined) => readonly TypeParameterNode[] | undefined;
/**
 * Extract type predicate from a signature's return type.
 *
 * ALICE'S SPEC: This is PURE SYNTAX inspection at registration time.
 * We check if the return TypeNode is a TypePredicateNode (x is T or this is T).
 * No TS type inference is used.
 *
 * @param returnTypeNode The signature's return type node
 * @param decl The signature declaration (to find parameter index)
 * @returns SignatureTypePredicate or undefined if not a predicate
 */
export declare const extractTypePredicate: (returnTypeNode: ts.TypeNode | undefined, decl: ts.SignatureDeclaration | undefined) => SignatureTypePredicate | undefined;
export declare const isOptionalMember: (symbol: ts.Symbol) => boolean;
export declare const isReadonlyMember: (decl: ts.Declaration | undefined) => boolean;
/**
 * Extract declaring identity from a signature declaration.
 *
 * CRITICAL for Alice's spec: Without this, resolveCall() cannot compute
 * inheritance substitution. It would have to "guess" the method name
 * from the signature, which breaks on overloads, aliases, etc.
 *
 * DESIGN (Phase 5 Step 4): Store the declaring type as a **simple TS name**
 * (identifier text like "Box"), NOT a TS "fully qualified name". TypeSystem
 * uses UnifiedTypeCatalog.resolveTsName() to resolve this to the proper
 * CLR FQ name for inheritance substitution.
 *
 * @param decl The signature declaration (method, function, etc.)
 * @returns { typeTsName, memberName } or undefined if not a member
 */
export declare const normalizeCapturedDeclaringTypeName: (name: string) => string;
export declare const extractDeclaringIdentity: (decl: ts.SignatureDeclaration | undefined) => {
    typeTsName: string;
    memberName: string;
} | undefined;
/**
 * Extract class member names from a ClassDeclaration.
 *
 * ALICE'S SPEC: This is PURE SYNTAX inspection at registration time.
 * We iterate class members and collect method/property names.
 * This data is used by TypeSystem.checkTsClassMemberOverride without
 * needing to inspect TS AST nodes or use hardcoded SyntaxKind numbers.
 *
 * @param classDecl The class declaration node
 * @returns ClassMemberNames with method and property name sets
 */
export declare const extractClassMemberNames: (classDecl: ts.ClassDeclaration) => ClassMemberNames;
//# sourceMappingURL=binding-helpers.d.ts.map