From 0535009f44b2f9ddf8e30b59700bacdb9a9b5e75 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Wed, 29 Jul 2026 13:46:25 +0530 Subject: [PATCH] feat(client): declare $frontmatter and $params as ComponentCustomProperties Allows the template globals to resolve and be typed in editors. Co-Authored-By: Claude Fable 5 --- src/client/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/index.ts b/src/client/index.ts index 7ba1293a..80322bd7 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -9,6 +9,7 @@ export type { Route, VitePressData } from './shared' export type { EnhanceAppContext, Theme } from './app/theme' // shared types +import type { PageData } from '../../types/shared' export type { HeadConfig, Header, PageData, SiteData } from '../../types/shared' // components @@ -36,4 +37,9 @@ declare module 'vue' { ClientOnly: typeof ClientOnly Content: typeof Content } + + interface ComponentCustomProperties { + $frontmatter: PageData['frontmatter'] + $params: PageData['params'] + } }