@volar/language-core 2.4.0 → 2.4.1

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.
@@ -25,6 +25,6 @@ export declare function isFormattingEnabled(info: CodeInformation): boolean;
25
25
  export declare function isCompletionEnabled(info: CodeInformation): boolean;
26
26
  export declare function isAutoInsertEnabled(info: CodeInformation): boolean;
27
27
  export declare function isSignatureHelpEnabled(info: CodeInformation): boolean;
28
- export declare function shouldReportDiagnostics(info: CodeInformation): boolean;
28
+ export declare function shouldReportDiagnostics(info: CodeInformation, source: string | undefined, code: string | number | undefined): boolean;
29
29
  export declare function resolveRenameNewName(newName: string, info: CodeInformation): string;
30
30
  export declare function resolveRenameEditText(text: string, info: CodeInformation): string;
@@ -112,9 +112,9 @@ function isSignatureHelpEnabled(info) {
112
112
  return !!info.completion;
113
113
  }
114
114
  // should...
115
- function shouldReportDiagnostics(info) {
115
+ function shouldReportDiagnostics(info, source, code) {
116
116
  return typeof info.verification === 'object'
117
- ? info.verification.shouldReport?.() ?? true
117
+ ? info.verification.shouldReport?.(source, code) ?? true
118
118
  : !!info.verification;
119
119
  }
120
120
  // resolve...
package/lib/types.d.ts CHANGED
@@ -52,7 +52,7 @@ export interface VirtualCode {
52
52
  export interface CodeInformation {
53
53
  /** virtual code is expected to support verification */
54
54
  verification?: boolean | {
55
- shouldReport?(): boolean;
55
+ shouldReport?(source: string | undefined, code: string | number | undefined): boolean;
56
56
  };
57
57
  /** virtual code is expected to support assisted completion */
58
58
  completion?: boolean | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-core",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/language-core"
13
13
  },
14
14
  "dependencies": {
15
- "@volar/source-map": "2.4.0"
15
+ "@volar/source-map": "2.4.1"
16
16
  },
17
- "gitHead": "7e98885cfe284451e655cf1c3954786b51aea2f8"
17
+ "gitHead": "b920b6c4a3e4b2d8f46c676ea414e94c437cb5b7"
18
18
  }