Skip to content

AnalyzeOverExposureParams

Parameters for analyzeOverExposure.

Import:

import type { AnalyzeOverExposureParams } from 'obsidian-dev-utils/script-utils/linters/over-exposure';

Signature:

export interface AnalyzeOverExposureParams

Properties

PropertyTypeDescription
languageServiceLanguageServiceThe language service to query for references and types.
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.

Methods

MethodReturnsDescription
onProgress(this, progress)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.
writeFile(this, path, content)voidWrites the tightened contents of a changed file back to disk. Required when shouldFix is true; ignored otherwise.

Links to this page: