import type * as Monaco from 'monaco-editor'; import type { editor } from 'monaco-editor'; import type { QuickFixData } from 'wikiparser-node'; import type { Option as LinterOption } from '@bhsd/codemirror-mediawiki/dist/linter.js'; export interface ILinter { lint?: (text: string, opt?: LiveOption) => editor.IMarkerData[] | Promise; fixer?: (text: string, rule?: string) => string | Promise; } declare interface ITextModelLinter extends Partial { glyphs: string[]; timer?: NodeJS.Timeout; disabled?: boolean; diagnostics?: (editor.IMarkerData & { data?: QuickFixData[]; })[]; option?: LiveOption; } export interface IWikitextModel extends editor.ITextModel { linter?: ITextModelLinter; lint?: (this: IWikitextModel, on?: boolean) => Promise; } export type LiveOption = LinterOption | ((_?: true) => LinterOption | Promise); export declare const linterGetters: Map Promise>; /** * 获取CM6存储 * @param key 键名 */ export declare const getCmObject: (key: string) => any; /** * 获取代码检查器 * @param monaco Monaco */ declare const _default: (monaco: typeof Monaco) => void; export default _default;