Skip to content

Commit

Permalink
fix: avoid reactive unwrap types in .d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Dec 31, 2021
1 parent 82f897b commit 5c3ba7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vscode-vue-languageservice/src/sourceFile.ts
Expand Up @@ -2,7 +2,7 @@ import * as shared from '@volar/shared';
import { parseRefSugarCallRanges, parseRefSugarDeclarationRanges } from '@volar/vue-code-gen/out/parsers/refSugarRanges';
import { parseScriptRanges } from '@volar/vue-code-gen/out/parsers/scriptRanges';
import { parseScriptSetupRanges } from '@volar/vue-code-gen/out/parsers/scriptSetupRanges';
import { computed, reactive, ref } from '@vue/reactivity';
import { computed, reactive, ref, shallowReactive } from '@vue/reactivity';
import { TextDocument } from 'vscode-languageserver-textdocument';
import type * as ts2 from 'vscode-typescript-languageservice';
import type { Data as TsCompletionData } from 'vscode-typescript-languageservice/src/services/completion';
Expand Down Expand Up @@ -36,13 +36,13 @@ export function createSourceFile(
scriptSetup: null,
styles: [],
customBlocks: [],
});
}) as shared.Sfc /* avoid Sfc unwrap in .d.ts by reactive */;
const lastUpdated = {
template: false,
script: false,
scriptSetup: false,
};
const templateScriptData = reactive<ITemplateScriptData>({
const templateScriptData = shallowReactive<ITemplateScriptData>({
projectVersion: undefined,
context: [],
contextItems: [],
Expand Down

0 comments on commit 5c3ba7f

Please sign in to comment.