Skip to content

Commit

Permalink
chore: try fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 12, 2024
1 parent a75c562 commit c67c86e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/twoslash-vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -70,7 +77,7 @@ export function createTwoslasher(createOptions: CreateTwoslashVueOptions = {}):
const vueLanguagePlugin = createVueLanguagePlugin<string>(ts, defaultCompilerOptions, resolvedVueOptions, id => id)
return createLanguage(
[vueLanguagePlugin],
new FileMap(ts.sys.useCaseSensitiveFileNames),
new FileMap(ts.sys.useCaseSensitiveFileNames) as unknown as Map<string, SourceScript<string>>,
() => {},
)
}
Expand Down

0 comments on commit c67c86e

Please sign in to comment.