@volar/typescript 1.6.7 → 1.6.9
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.
- package/out/getProgram.js +4 -2
- package/out/index.d.ts +2 -2
- package/out/index.js +1 -2
- package/package.json +3 -6
package/out/getProgram.js
CHANGED
|
@@ -85,10 +85,12 @@ function getProgram(ts, core, ls) {
|
|
|
85
85
|
if (sourceFileName !== source.fileName)
|
|
86
86
|
continue;
|
|
87
87
|
for (const start of map.toSourceOffsets(diagnostic.start)) {
|
|
88
|
-
|
|
88
|
+
const reportStart = typeof start[1].data.diagnostic === 'object' ? typeof start[1].data.diagnostic.shouldReport() : !!start[1].data.diagnostic;
|
|
89
|
+
if (!reportStart)
|
|
89
90
|
continue;
|
|
90
91
|
for (const end of map.toSourceOffsets(diagnostic.start + diagnostic.length, true)) {
|
|
91
|
-
|
|
92
|
+
const reportEnd = typeof end[1].data.diagnostic === 'object' ? typeof end[1].data.diagnostic.shouldReport() : !!end[1].data.diagnostic;
|
|
93
|
+
if (!reportEnd)
|
|
92
94
|
continue;
|
|
93
95
|
onMapping(diagnostic, source.fileName, start[0], end[0], source.snapshot.getText(0, source.snapshot.getLength()));
|
|
94
96
|
break;
|
package/out/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as ts from 'typescript';
|
|
1
|
+
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
2
2
|
import * as embedded from '@volar/language-core';
|
|
3
|
-
export declare function createLanguageService(host: embedded.LanguageServiceHost, mods: embedded.Language[]): {
|
|
3
|
+
export declare function createLanguageService(host: embedded.LanguageServiceHost, mods: embedded.Language[], ts: typeof import('typescript/lib/tsserverlibrary')): {
|
|
4
4
|
__internal__: {
|
|
5
5
|
languageService: ts.LanguageService;
|
|
6
6
|
context: embedded.LanguageContext;
|
package/out/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createLanguageService = void 0;
|
|
4
|
-
const ts = require("typescript"); // this is a peer dependency
|
|
5
4
|
const getProgram_1 = require("./getProgram");
|
|
6
5
|
const embedded = require("@volar/language-core");
|
|
7
|
-
function createLanguageService(host, mods) {
|
|
6
|
+
function createLanguageService(host, mods, ts) {
|
|
8
7
|
const core = embedded.createLanguageContext({ typescript: ts }, host, mods);
|
|
9
8
|
if (!ts) {
|
|
10
9
|
throw new Error('TypeScript module not provided.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/typescript",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.9",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
"directory": "packages/typescript"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@volar/language-core": "1.6.
|
|
16
|
+
"@volar/language-core": "1.6.9"
|
|
17
17
|
},
|
|
18
|
-
"
|
|
19
|
-
"typescript": "*"
|
|
20
|
-
},
|
|
21
|
-
"gitHead": "17154cd7d468c5b45baf50ea4b2e0f83406b6c03"
|
|
18
|
+
"gitHead": "e676fa08e4186bd2f8cc14861ef65f8d8c855ea1"
|
|
22
19
|
}
|