Skip to content

AnalyzeOverExposureParams

Parameters for analyzeOverExposure.

Import:

import type { AnalyzeOverExposureParams } from '@mnaoumov/typescript-dev-toolkit/linters/over-exposure';

Signature:

export interface AnalyzeOverExposureParams

Properties

PropertyTypeDescription
languageServiceLanguageServiceThe language service to query for references and types.
onProgress?(progress: OverExposureProgress) => voidOptional callback invoked once per analyzed source file, before that file is processed. The whole-program reference analysis is slow, so this lets callers report live progress instead of appearing to hang.
shouldFix?boolean | undefinedWhen true, each fixable finding is tightened in place via writeFile (which must then be provided), and the returned findings carry OverExposureFinding.wasFixed / OverExposureFinding.skipReason. When false or omitted, the analysis only reports.
shouldForce?boolean | undefinedWhen true (only meaningful together with shouldFix), declarations held wide purely by test references are tightened too, instead of being skipped with a test-only OverExposureFinding.skipReason. Decorated members and exports shared with a still-exported sibling stay skipped regardless, because no edit can be applied safely.
srcFolderstringAbsolute (canonical) path of the project's src folder. Only declarations in non-test files under this folder are analyzed; declarations elsewhere (test files, dependencies) are ignored but still counted as reference sites.
writeFile?(path: string, content: string) => voidWrites the tightened contents of a changed file back to disk. Required when shouldFix is true; ignored otherwise.

Links to this page: