import type { Compartment } from '@codemirror/state'; import type { EditorView } from '@codemirror/view'; import type { RefObject } from 'react'; type GutterSeverity = 'error' | 'warning'; /** * Minimal shape shared by CodeMirror's `Diagnostic` and our `InlineDiagnostic`, * covering only the fields the gutter needs — avoids casting between the two. */ type LineDiagnosticInput = { from: number; severity?: 'hint' | 'info' | 'warning' | 'error'; }; /** * Returns the highest severity (`error` beats `warning`) among the diagnostics * that start on the line at `lineFrom`. Multi-line diagnostics are attributed to * the line containing `d.from`; `info`/`hint` diagnostics are ignored. Returns * `null` when the line has no `error`/`warning` diagnostic. * * @param diagnostics - all diagnostics in the editor * @param lineFrom - document offset of the line's first character * @param getLineFrom - maps any document position to its line's start offset * @internal */ export declare function _buildLineMarker(diagnostics: readonly LineDiagnosticInput[], lineFrom: number, getLineFrom: (pos: number) => number): GutterSeverity | null; /** * Builds the lint gutter extension. The column is always rendered (matching the fold * gutter) so the editor never reflows when markers appear or disappear. * * @internal */ export declare function getLintGutterExtension(shouldShowMarkers: boolean): import("@codemirror/state").Extension; /** * Updates the lint gutter extension in `lintGutterCompartment` to show or hide markers. * The gutter column itself is always installed; only marker visibility toggles. * * Markers are driven by whatever diagnostics currently exist in CodeMirror's shared * lint state, regardless of which linter populated it. * * @internal */ export declare function configureLintGutter(showLintGutter: boolean | undefined, editorViewRef: RefObject, lintGutterCompartment: Compartment, isLintGutterMarkersShownRef: RefObject): void; export {}; //# sourceMappingURL=configure-lint-gutter.d.ts.map