diff --git a/apps/vdn-static/src/composables/useMeta.ts b/apps/vdn-static/src/composables/useMeta.ts index 4d5766c..3f874ce 100644 --- a/apps/vdn-static/src/composables/useMeta.ts +++ b/apps/vdn-static/src/composables/useMeta.ts @@ -235,7 +235,7 @@ export function useMeta( routeValue: RouteLocationNormalizedLoaded ): T | undefined => { if (value === undefined) return undefined - return typeof value === 'function' ? value(routeValue) : value + return typeof value === 'function' ? (value as Function)(routeValue) as T : value } /** diff --git a/apps/vdn-static/src/types/route-meta.d.ts b/apps/vdn-static/src/types/route-meta.d.ts index ab58a94..06e20c5 100644 --- a/apps/vdn-static/src/types/route-meta.d.ts +++ b/apps/vdn-static/src/types/route-meta.d.ts @@ -116,29 +116,4 @@ export type RouteMetaValue = T | ((route: RouteLocationNormalizedLoaded) => T /** * Helper function type for dynamic meta values */ -export type MetaValueFunction = (route: RouteLocationNormalizedLoaded) => T - -/** - * Type guard for checking if a meta value is a function - */ -export function isMetaFunction( - value: RouteMetaValue -): value is MetaValueFunction { - return typeof value === 'function' -} - -/** - * Type for route with extended meta - */ -export interface RouteWithMeta { - meta: RouteMeta - name?: string | symbol - path: string -} - -/** - * Type for pages that support meta configuration - */ -export interface PageMetaConfig { - meta?: RouteMeta -} \ No newline at end of file +export type MetaValueFunction = (route: RouteLocationNormalizedLoaded) => T \ No newline at end of file