AnalyzeOverExposureParams
Parameters for analyzeOverExposure.
Import:
import type { AnalyzeOverExposureParams } from 'obsidian-dev-utils/script-utils/linters/over-exposure';Signature:
export interface AnalyzeOverExposureParamsProperties
| Property | Type | Description |
|---|---|---|
| languageService | LanguageService | The language service to query for references and types. |
| shouldFix? | boolean | undefined | When 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 | undefined | When 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. |
| srcFolder | string | Absolute (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. |
Methods
| Method | Returns | Description |
|---|---|---|
| onProgress(this, progress) | void | Optional 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. |
| writeFile(this, path, content) | void | Writes the tightened contents of a changed file back to disk. Required when shouldFix is true; ignored otherwise. |
Links to this page: