@volar/vue-typescript
Advanced tools
Comparing version 0.36.0 to 0.36.1
@@ -20,3 +20,4 @@ import type * as ts from 'typescript/lib/tsserverlibrary'; | ||
experimentalAllowTypeNarrowingInInlineHandlers?: boolean; | ||
experimentalSuppressUnknownJsxPropertyErrors?: boolean; | ||
experimentalUseScriptLeadingCommentInTemplate?: boolean; | ||
} |
@@ -14,3 +14,3 @@ "use strict"; | ||
const { typescript: ts } = options; | ||
const vueVersion = (_a = options.vueLsHost.getVueCompilationSettings().experimentalCompatMode) !== null && _a !== void 0 ? _a : 3; | ||
const vueCompilerOptions = options.vueLsHost.getVueCompilationSettings(); | ||
const tsFileVersions = new Map(); | ||
@@ -24,3 +24,3 @@ const vueFiles = (0, vueFiles_1.createVueFiles)(); | ||
const tsLsRaw = ts.createLanguageService(tsLsHost); | ||
const localTypesScript = ts.ScriptSnapshot.fromString(localTypes.getTypesCode(vueVersion)); | ||
const localTypesScript = ts.ScriptSnapshot.fromString(localTypes.getTypesCode((_a = vueCompilerOptions.experimentalCompatMode) !== null && _a !== void 0 ? _a : 3)); | ||
let lastProjectVersion; | ||
@@ -41,4 +41,5 @@ let tsProjectVersion = 0; | ||
getLocalTypesFiles: () => { | ||
var _a; | ||
const fileNames = getLocalTypesFiles(); | ||
const code = localTypes.getTypesCode(vueVersion); | ||
const code = localTypes.getTypesCode((_a = vueCompilerOptions.experimentalCompatMode) !== null && _a !== void 0 ? _a : 3); | ||
return { | ||
@@ -229,2 +230,3 @@ fileNames, | ||
function getScriptSnapshot(fileName) { | ||
var _a; | ||
const version = getScriptVersion(fileName); | ||
@@ -248,2 +250,8 @@ const cache = scriptSnapshots.get(fileName.toLowerCase()); | ||
if (tsScript) { | ||
if (((_a = vueCompilerOptions.experimentalSuppressUnknownJsxPropertyErrors) !== null && _a !== void 0 ? _a : true) && basename === 'runtime-dom.d.ts') { | ||
// allow arbitrary attributes | ||
let tsScriptText = tsScript.getText(0, tsScript.getLength()); | ||
tsScriptText = tsScriptText.replace('type ReservedProps = {', 'type ReservedProps = { [name: string]: any'); | ||
tsScript = ts.ScriptSnapshot.fromString(tsScriptText); | ||
} | ||
scriptSnapshots.set(fileName.toLowerCase(), [version, tsScript]); | ||
@@ -250,0 +258,0 @@ return tsScript; |
{ | ||
"name": "@volar/vue-typescript", | ||
"version": "0.36.0", | ||
"version": "0.36.1", | ||
"main": "out/index.js", | ||
@@ -16,9 +16,9 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@volar/pug-language-service": "0.36.0", | ||
"@volar/pug-language-service": "0.36.1", | ||
"typescript": "latest" | ||
}, | ||
"dependencies": { | ||
"@volar/code-gen": "0.36.0", | ||
"@volar/source-map": "0.36.0", | ||
"@volar/vue-code-gen": "0.36.0", | ||
"@volar/code-gen": "0.36.1", | ||
"@volar/source-map": "0.36.1", | ||
"@volar/vue-code-gen": "0.36.1", | ||
"@vue/compiler-sfc": "^3.2.36", | ||
@@ -30,3 +30,3 @@ "@vue/reactivity": "^3.2.36" | ||
}, | ||
"gitHead": "c1bb6990fd2433673923fbf55897a8bf91c03a6f" | ||
"gitHead": "d0e4dbd21d1c0f28d0015c96390cca535c85bf24" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122473
2584
+ Added@volar/code-gen@0.36.1(transitive)
+ Added@volar/source-map@0.36.1(transitive)
+ Added@volar/vue-code-gen@0.36.1(transitive)
- Removed@volar/code-gen@0.36.0(transitive)
- Removed@volar/source-map@0.36.0(transitive)
- Removed@volar/vue-code-gen@0.36.0(transitive)
Updated@volar/code-gen@0.36.1
Updated@volar/source-map@0.36.1
Updated@volar/vue-code-gen@0.36.1