fix(types): import EnhanceAppContext from package entry in theme.d.ts

Since #5156 the vue GlobalComponents augmentation exists in both
src/client/index.ts and dist/client/index.d.ts. The unit tests type
check included both copies (vitepress mapped to source, theme.d.ts
hardcoding ./dist/client/index.js), failing with TS2717. A bare
'vitepress' import resolves to the same dist types for consumers but
respects paths in repo tsconfigs, keeping the test program all-source.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5340/head
Divyansh Singh 5 days ago
parent 83f22a4b7d
commit 8ff1f3e2dd

2
theme.d.ts vendored

@ -1,7 +1,7 @@
// so that users can do `import DefaultTheme from 'vitepress/theme'`
import type { EnhanceAppContext } from 'vitepress'
import type { ComputedRef, DefineComponent, ShallowRef } from 'vue'
import type { EnhanceAppContext } from './dist/client/index.js'
import type { DefaultTheme } from './types/default-theme.js'
export type { DefaultTheme } from './types/default-theme.js'

Loading…
Cancel
Save