Skip to content

analyzeOverExposure

Analyzes a project (already loaded into a language service) for over-exposed declarations, and — when AnalyzeOverExposureParams.shouldFix is set — tightens every fixable finding in place via AnalyzeOverExposureParams.writeFile. Findings that cannot be safely automated (exposed only for tests, decorated, or sharing an export keyword with a still-exported sibling) carry a OverExposureFinding.skipReason and are left untouched — unless AnalyzeOverExposureParams.shouldForce is set, which additionally tightens the test-only findings (decorated and shared-export ones still stay skipped).

Import:

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

Signature:

function analyzeOverExposure(params: AnalyzeOverExposureParams): OverExposureFinding[]

Parameters:

ParameterTypeDescription
paramsAnalyzeOverExposureParamsThe AnalyzeOverExposureParams.

Returns: OverExposureFinding[] — The over-exposed declarations, in discovery order.


Links to this page: