From 36cef927bccc3c3331b1077d6c982e921bb24fc5 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 5 Jul 2024 08:04:24 +0800 Subject: [PATCH] chore: replace type import to triple-slash directives for `@volar/typescript` --- packages/language-core/lib/languageModule.ts | 11 ++++++----- packages/language-service/index.ts | 2 ++ .../lib/plugins/vue-autoinsert-dotvalue.ts | 1 - 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/language-core/lib/languageModule.ts b/packages/language-core/lib/languageModule.ts index f416de2e5e..2586c82465 100644 --- a/packages/language-core/lib/languageModule.ts +++ b/packages/language-core/lib/languageModule.ts @@ -1,14 +1,15 @@ +/// + import { forEachEmbeddedCode, type LanguagePlugin } from '@volar/language-core'; +import * as CompilerDOM from '@vue/compiler-dom'; import type * as ts from 'typescript'; import { getBasePlugins } from './plugins'; -import type { VueCompilerOptions, VueLanguagePlugin } from './types'; -import { VueVirtualCode } from './virtualFile/vueFile'; -import * as CompilerDOM from '@vue/compiler-dom'; -import * as CompilerVue2 from './utils/vue2TemplateCompiler'; import useHtmlFilePlugin from './plugins/file-html'; import useMdFilePlugin from './plugins/file-md'; import useVueFilePlugin from './plugins/file-vue'; -import type * as _ from '@volar/typescript'; +import type { VueCompilerOptions, VueLanguagePlugin } from './types'; +import * as CompilerVue2 from './utils/vue2TemplateCompiler'; +import { VueVirtualCode } from './virtualFile/vueFile'; const normalFileRegistries: { key: string; diff --git a/packages/language-service/index.ts b/packages/language-service/index.ts index 12cd4e264a..f32460d04d 100644 --- a/packages/language-service/index.ts +++ b/packages/language-service/index.ts @@ -1,3 +1,5 @@ +/// + export * from '@volar/language-service'; export * from '@vue/language-core'; export * from './lib/ideFeatures/nameCasing'; diff --git a/packages/language-service/lib/plugins/vue-autoinsert-dotvalue.ts b/packages/language-service/lib/plugins/vue-autoinsert-dotvalue.ts index 69510758e7..6a347c6c68 100644 --- a/packages/language-service/lib/plugins/vue-autoinsert-dotvalue.ts +++ b/packages/language-service/lib/plugins/vue-autoinsert-dotvalue.ts @@ -3,7 +3,6 @@ import { hyphenateAttr } from '@vue/language-core'; import type * as ts from 'typescript'; import type { TextDocument } from 'vscode-languageserver-textdocument'; import { URI } from 'vscode-uri'; -import * as _ from '@volar/typescript'; const asts = new WeakMap();