Nuxt/packages/nuxt/src/app/components/injections.ts

11 lines
374 B
TypeScript
Raw Normal View History

import type { InjectionKey } from 'vue'
import type { RouteLocationNormalizedLoaded } from 'vue-router'
export interface LayoutMeta {
isCurrent: (route: RouteLocationNormalizedLoaded) => boolean
}
export const LayoutMetaSymbol: InjectionKey<LayoutMeta> = Symbol('layout-meta')
export const PageRouteSymbol: InjectionKey<RouteLocationNormalizedLoaded> = Symbol('route')