import { ComputedRef, /* KeepAliveProps, */ Ref, TransitionProps } from 'vue' import type { Router, RouteLocationNormalizedLoaded } from 'vue-router' import { useNuxtApp } from '#app' export const useRouter = () => { return useNuxtApp().$router as Router } export const useRoute = () => { return useNuxtApp()._route as RouteLocationNormalizedLoaded } export interface PageMeta { [key: string]: any transition?: false | TransitionProps layout?: false | string | Ref | ComputedRef // TODO: https://github.com/vuejs/vue-next/issues/3652 // keepalive?: false | KeepAliveProps } declare module 'vue-router' { interface RouteMeta extends PageMeta {} } const warnRuntimeUsage = (method: string) => console.warn( `${method}() is a compiler-hint helper that is only usable inside ` + '