Skip to content

Commit

Permalink
feat: export more types
Browse files Browse the repository at this point in the history
  • Loading branch information
fanwei committed Nov 9, 2021
1 parent 0651468 commit 7c72fd5
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/vue-router.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import Vue from 'vue'
import { computed, ComputedRef, getCurrentInstance, reactive, shallowRef } from '@vue/composition-api'
import VueRouter, { NavigationGuard, Route, RouterOptions, RouteConfig, RawLocation } from 'vue-router'
import VueRouter, { NavigationGuard, Route, RouterOptions } from 'vue-router'
import { OUT_OF_SCOPE, warn } from './utils'


export type RouteRecordRaw = RouteConfig
export type RouteLocationRaw = RawLocation
export {
RouteMeta,
RouterOptions,
RouteRecord,
RouteConfig as RouteRecordRaw,
RedirectOption as RouteRecordRedirectOption,
RawLocation as RouteLocationRaw,
} from 'vue-router'
export type RouteRecordName = string | symbol
export type RouterScrollBehavior = RouterOptions['scrollBehavior']
export type RouteLocationNormalized = Route
export type RouteLocationNormalizedLoaded = Route


export interface Router extends VueRouter {
Expand Down Expand Up @@ -46,10 +56,6 @@ export function useRouter(): Router {
}


export interface RouteLocationNormalized extends Route {}
export interface RouteLocationNormalizedLoaded extends Route {}


let currentRoute: RouteLocationNormalizedLoaded

export function useRoute() {
Expand Down

0 comments on commit 7c72fd5

Please sign in to comment.