From 8ff1f3e2dd34fd443c0fa80cf3962f9d67e81cf5 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Wed, 29 Jul 2026 12:49:54 +0530 Subject: [PATCH] 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 --- theme.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme.d.ts b/theme.d.ts index 9d666400..ef765c04 100644 --- a/theme.d.ts +++ b/theme.d.ts @@ -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'