From c67c86e8f4d7f46b1831e4c38e1616569aa9e5c2 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 12 Sep 2024 18:08:06 +0200 Subject: [PATCH] chore: try fix type error --- packages/twoslash-vue/src/index.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/twoslash-vue/src/index.ts b/packages/twoslash-vue/src/index.ts index 2481ff5..160bfc8 100644 --- a/packages/twoslash-vue/src/index.ts +++ b/packages/twoslash-vue/src/index.ts @@ -1,4 +1,4 @@ -import type { Language, VueCompilerOptions } from '@vue/language-core' +import type { Language, SourceScript, VueCompilerOptions } from '@vue/language-core' import type { CompilerOptionDeclaration, CreateTwoslashOptions, @@ -10,7 +10,14 @@ import type { TwoslashReturnMeta, } from 'twoslash' import type { CompilerOptions } from 'typescript' -import { createLanguage, createVueLanguagePlugin, defaultMapperFactory, FileMap, resolveVueCompilerOptions, setupGlobalTypes } from '@vue/language-core' +import { + createLanguage, + createVueLanguagePlugin, + defaultMapperFactory, + FileMap, + resolveVueCompilerOptions, + setupGlobalTypes, +} from '@vue/language-core' import { createTwoslasher as createTwoslasherBase, defaultCompilerOptions, @@ -70,7 +77,7 @@ export function createTwoslasher(createOptions: CreateTwoslashVueOptions = {}): const vueLanguagePlugin = createVueLanguagePlugin(ts, defaultCompilerOptions, resolvedVueOptions, id => id) return createLanguage( [vueLanguagePlugin], - new FileMap(ts.sys.useCaseSensitiveFileNames), + new FileMap(ts.sys.useCaseSensitiveFileNames) as unknown as Map>, () => {}, ) }