import type * as ts from 'typescript'; /** * Information about a single parameter in a function signature. * * @alpha */ export interface ParameterInfo { /** Original parameter name from source */ name: string; /** Type as a string */ type: string; /** Position in the parameter list (0-indexed) */ position: number; /** Whether the parameter is optional */ isOptional: boolean; /** Whether the parameter is a rest parameter */ isRest: boolean; } /** * Analysis of a single parameter position change. * * @alpha */ export interface ParameterPositionAnalysis { /** Position in the parameter list */ position: number; /** Old parameter name */ oldName: string; /** New parameter name */ newName: string; /** Type at this position (same in both if types match) */ type: string; /** Similarity score between old and new names (0-1) */ similarity: number; /** Human-readable interpretation of the change */ interpretation: string; } /** * Confidence level for parameter reordering detection. * * @alpha */ export type ReorderingConfidence = 'high' | 'medium' | 'low'; /** * Result of analyzing parameter order changes between two function signatures. * * @alpha */ export interface ParameterOrderAnalysis { /** Whether parameters appear to have been reordered */ hasReordering: boolean; /** Confidence level of the reordering detection */ confidence: ReorderingConfidence; /** Human-readable summary of the analysis */ summary: string; /** Detailed analysis of each parameter position */ positionAnalysis: ParameterPositionAnalysis[]; /** The old parameter order */ oldParams: ParameterInfo[]; /** The new parameter order */ newParams: ParameterInfo[]; } /** * Calculates the Levenshtein edit distance between two strings. * This measures the minimum number of single-character edits * (insertions, deletions, substitutions) needed to transform one string into another. * * @alpha */ export declare function editDistance(a: string, b: string): number; /** * Calculates a normalized similarity score between two strings (0-1). * 1 means identical, 0 means completely different. * * @alpha */ export declare function nameSimilarity(a: string, b: string): number; /** * Generates a human-readable interpretation of a name change based on similarity. * * @param oldName - The original parameter name * @param newName - The new parameter name * @param similarity - Pre-computed similarity score * @returns Human-readable interpretation * * @alpha */ export declare function interpretNameChange(oldName: string, newName: string, similarity: number): string; /** * Extracts parameter information from a TypeScript signature. * * @alpha */ export declare function extractParameterInfo(sig: ts.Signature, checker: ts.TypeChecker, tsModule: typeof ts): ParameterInfo[]; /** * Detects if parameters have been reordered between two signatures. * * This provides rich analysis including: * - Whether reordering is detected * - Confidence level based on the evidence * - Detailed per-position analysis with similarity scores * - Human-readable interpretations for user feedback * * @param oldParams - Parameter info from the old signature * @param newParams - Parameter info from the new signature * @returns Detailed analysis result * * @alpha */ export declare function detectParameterReordering(oldParams: ParameterInfo[], newParams: ParameterInfo[]): ParameterOrderAnalysis; //# sourceMappingURL=parameter-analysis.d.ts.map