Skip to content

Commit 5c1d7a2

Browse files
committed
refactor(plugin-theme-data): improve type assertion
1 parent 9d85d4f commit 5c1d7a2

File tree

1 file changed

+7
-3
lines changed
  • ecosystem/plugin-theme-data/src/client

1 file changed

+7
-3
lines changed

ecosystem/plugin-theme-data/src/client/config.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { setupDevtoolsPlugin } from '@vue/devtools-api'
2-
import { defineClientConfig, routeLocaleSymbol } from '@vuepress/client'
2+
import {
3+
defineClientConfig,
4+
type RouteLocaleRef,
5+
routeLocaleSymbol,
6+
} from '@vuepress/client'
37
import { computed } from 'vue'
48
import {
59
resolveThemeLocaleData,
@@ -11,8 +15,8 @@ export default defineClientConfig({
1115
enhance({ app }) {
1216
// provide theme data & theme locale data
1317
const themeData = useThemeData()
14-
const routeLocale =
15-
app._context.provides[routeLocaleSymbol as unknown as string]
18+
const routeLocale: RouteLocaleRef =
19+
app._context.provides[routeLocaleSymbol as unknown as symbol]
1620
const themeLocaleData = computed(() =>
1721
resolveThemeLocaleData(themeData.value, routeLocale.value)
1822
)

0 commit comments

Comments
 (0)