import type { Compartment } from '@codemirror/state'; import type { EditorView } from '@codemirror/view'; import type { RefObject } from 'react'; import type { InlineDiagnostic } from '../../code-editor/inline-diagnostic.js'; /** * Creates a CodeMirror linter extension that renders the provided inline diagnostics. * @param diagnosticsRef - A ref to the current inline diagnostics. * @returns a CodeMirror extension that renders the inline diagnostics. * @internal */ export declare function getDiagnosticsExtension(diagnosticsRef: RefObject): import("@codemirror/state").Extension; /** * Installs, updates, or removes the inline diagnostics extension. * * - `undefined → defined`: installs the linter via compartment reconfiguration. * - `defined → defined`: updates the ref and triggers a re-run without re-installing. * - `defined → undefined`: removes the linter via compartment reconfiguration. * * @param diagnostics - The inline diagnostics to render, or `undefined` to remove them. * @param editorViewRef - A ref to the editor view. * @param diagnosticsRef - A ref to the current inline diagnostics. * @param isEnabledRef - A ref to whether the linter is currently installed. * @param diagnosticsCompartment - The compartment used to manage the diagnostics extension. * @internal */ export declare function configureDiagnostics(diagnostics: InlineDiagnostic[] | undefined, editorViewRef: RefObject, diagnosticsRef: RefObject, isEnabledRef: RefObject, diagnosticsCompartment: Compartment): void; //# sourceMappingURL=configure-diagnostics.d.ts.map