/** * New calls into deprecated code (change: add-deprecation-propagation). * * The analyzer records each declaration's standard deprecation marker (`FunctionNode.deprecation`: * JSDoc `@deprecated`, Go `// Deprecated:`, PEP 702 `@deprecated`). Here, each call edge a diff * ADDS is resolved to its target and reported when the target is marked — the SA1019 question, * "does my diff add calls into deprecated code?". A call that was already there is not reported. * * Resolution never guesses. In order: * 1. `changed-files` — the edge resolved to a symbol in the re-parsed changed files; * 2. `index-edge` — the analyzed index has the same caller → name edge, to one internal symbol; * 3. `unique-name` — a plain `name()` call (no receiver) and the index has exactly one internal * symbol with that name. * Anything else (library calls, method calls on unknown receivers, ambiguous names) is not checked, * and the caveat says so. */ import type { CallEdge, SerializedCallGraph } from '../../analyzer/call-graph.js'; import type { EdgeStore } from '../edge-store.js'; import type { GovernanceFinding } from './enforcement-policy.js'; export type DeprecatedTargetResolution = 'changed-files' | 'index-edge' | 'unique-name'; export interface DeprecatedCall { caller: string; callerFile: string; line?: number; target: string; targetFile: string; /** The marker's replacement hint; empty when the marker gives none. */ hint: string; resolution: DeprecatedTargetResolution; } export declare const DEPRECATED_CALLS_CAVEAT: string; /** The added call edges whose target is marked deprecated, sorted by caller file, line, target. */ export declare function findDeprecatedCalls(addedEdges: readonly CallEdge[], newGraph: SerializedCallGraph, store: EdgeStore | undefined): DeprecatedCall[]; /** One advisory `deprecated-symbol-use` finding per new call. */ export declare function deprecatedCallFindings(calls: readonly DeprecatedCall[]): GovernanceFinding[]; //# sourceMappingURL=deprecated-calls.d.ts.map