/** * @fileoverview Null-safety analysis — convention and type-aware detectors. */ import { type CheckViolation, type FileAccessor } from '@opensip-cli/fitness'; import { type TypeCheckedProgram } from '@opensip-cli/lang-typescript'; import * as ts from 'typescript'; /** * @param {*} content * @param {*} filePath * @returns {*} * Analyze a file for null safety issues. Exported for the FP-regression * suite (see `__tests__/null-safety-fp.test.ts`). */ export declare function analyzeNullSafety(content: string, filePath: string): CheckViolation[]; /** * Type-aware variant (D2): walk the Program's SourceFile and flag a property * access on a call/element-access result ONLY when the receiver's actual type * includes `null`/`undefined`. The TypeChecker subsumes every heuristic the * convention path uses — control-flow narrowing (guards), builder/Zod return * types, and chain depth all fall out of real types — so this detector is * deliberately minimal. Fail-open: `any`/`unknown`/unresolved types are not * nullable per `isTypeNullable`, so "the compiler doesn't know" never flags. * * Reads the same path skip + escape-hatch config as the convention path * (`additionalSafeNullPaths`, `additionalSafeBuilders`). Exported for the * type-aware test suite. */ export declare function analyzeNullSafetyTyped(sourceFile: ts.SourceFile, checker: ts.TypeChecker, filePath: string): CheckViolation[]; /** Type-aware per-file analysis (D2): flag via the shared Program's checker. */ export declare function analyzeFileTyped(program: TypeCheckedProgram, filePath: string): CheckViolation[]; /** Convention per-file analysis (default): scan the filtered content (no types). */ export declare function analyzeFileConvention(files: FileAccessor, filePath: string): Promise; //# sourceMappingURL=null-safety-analyze.d.ts.map