@dash0hq/codemirror-promql
Version:
a CodeMirror mode for the PromQL language
11 lines (10 loc) • 499 B
TypeScript
import { EditorView } from '@codemirror/view';
import { Diagnostic } from '@codemirror/lint';
import { Extension } from '@codemirror/state';
type lintFunc = (view: EditorView) => readonly Diagnostic[] | Promise<readonly Diagnostic[]>;
export interface LintStrategy {
promQL(this: LintStrategy): lintFunc;
}
export declare function newLintStrategy(): LintStrategy;
export declare function promQLLinter(callbackFunc: (this: LintStrategy) => lintFunc, thisArg: LintStrategy): Extension;
export {};