Skip to content

Commit 1a92dc5

Browse files
posvayyx990803
authored andcommitted
Update flow type for beforeEnter (#783)
1 parent aa939ec commit 1a92dc5

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

flow/declarations.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ declare type RouteConfig = {
3535
redirect?: RedirectOption;
3636
alias?: string | Array<string>;
3737
children?: Array<RouteConfig>;
38-
beforeEnter?: (
39-
route: Route,
40-
redirect: (location: RawLocation) => void,
41-
next: () => void
42-
) => any;
38+
beforeEnter?: NavigationGuard;
4339
meta?: any;
4440
}
4541

@@ -51,11 +47,7 @@ declare type RouteRecord = {
5147
parent: ?RouteRecord;
5248
redirect: ?RedirectOption;
5349
matchAs: ?string;
54-
beforeEnter: ?(
55-
route: Route,
56-
redirect: (location: RawLocation) => void,
57-
next: () => void
58-
) => any;
50+
beforeEnter: ?NavigationGuard;
5951
meta: any;
6052
}
6153

0 commit comments

Comments
 (0)