@bhsd/codemirror-mediawiki 2.18.12 → 2.18.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,7 @@ export declare class CodeMirror6 {
32
32
  * @param lang 语言
33
33
  * @param config 语言设置
34
34
  */
35
- setLanguage(lang?: string, config?: unknown): void;
35
+ setLanguage(lang?: string, config?: unknown): void | Promise<void>;
36
36
  /**
37
37
  * 开始语法检查
38
38
  * @param lintSource 语法检查函数
package/dist/linter.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { LinterBase } from 'wikiparser-node/extensions/typings';
2
2
  import type { Linter } from 'eslint';
3
3
  import type { Warning } from 'stylelint';
4
+ import type { Diagnostic } from 'luacheck-browserify';
4
5
  declare type getLinter<T> = (opt?: Record<string, unknown>) => T;
5
6
  declare type getAsyncLinter<T> = (opt?: Record<string, unknown>) => Promise<T>;
6
7
  /**
@@ -19,7 +20,7 @@ export declare const getJsLinter: getAsyncLinter<(text: string) => Linter.LintMe
19
20
  */
20
21
  export declare const getCssLinter: getAsyncLinter<(text: string) => Promise<Warning[]>>;
21
22
  /** 获取 Luacheck */
22
- export declare const getLuaLinter: getAsyncLinter<(text: string) => Promise<LuaReport[]>>;
23
+ export declare const getLuaLinter: getAsyncLinter<(text: string) => Promise<Diagnostic[]>>;
23
24
  declare interface JsonError {
24
25
  message: string;
25
26
  severity: 'error';