Skip to content

Commit 7c72fd5

Browse files
author
fanwei
committed
feat: export more types
1 parent 0651468 commit 7c72fd5

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/vue-router.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
import Vue from 'vue'
22
import { computed, ComputedRef, getCurrentInstance, reactive, shallowRef } from '@vue/composition-api'
3-
import VueRouter, { NavigationGuard, Route, RouterOptions, RouteConfig, RawLocation } from 'vue-router'
3+
import VueRouter, { NavigationGuard, Route, RouterOptions } from 'vue-router'
44
import { OUT_OF_SCOPE, warn } from './utils'
55

66

7-
export type RouteRecordRaw = RouteConfig
8-
export type RouteLocationRaw = RawLocation
7+
export {
8+
RouteMeta,
9+
RouterOptions,
10+
RouteRecord,
11+
RouteConfig as RouteRecordRaw,
12+
RedirectOption as RouteRecordRedirectOption,
13+
RawLocation as RouteLocationRaw,
14+
} from 'vue-router'
15+
export type RouteRecordName = string | symbol
16+
export type RouterScrollBehavior = RouterOptions['scrollBehavior']
17+
export type RouteLocationNormalized = Route
18+
export type RouteLocationNormalizedLoaded = Route
919

1020

1121
export interface Router extends VueRouter {
@@ -46,10 +56,6 @@ export function useRouter(): Router {
4656
}
4757

4858

49-
export interface RouteLocationNormalized extends Route {}
50-
export interface RouteLocationNormalizedLoaded extends Route {}
51-
52-
5359
let currentRoute: RouteLocationNormalizedLoaded
5460

5561
export function useRoute() {

0 commit comments

Comments
 (0)