Skip to content

Commit

Permalink
fix(types): missing children
Browse files Browse the repository at this point in the history
Close #3230
  • Loading branch information
posva committed Jun 13, 2020
1 parent 0eaae3a commit c1df447
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion types/router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export interface PathToRegexpOptions {
interface _RouteConfigBase {
path: string
name?: string
children?: RouteConfig[]
redirect?: RedirectOption
alias?: string | string[]
meta?: any
Expand All @@ -107,7 +108,6 @@ interface RouteConfigSingleView extends _RouteConfigBase {

interface RouteConfigMultipleViews extends _RouteConfigBase {
components?: Dictionary<Component>
children?: RouteConfig[]
props?: Dictionary<boolean | Object | RoutePropsFunction>
}

Expand Down
10 changes: 10 additions & 0 deletions types/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ const router = new VueRouter({
})
},
routes: [
{
path: '/foo',
component: Home,
children: [{ path: '', component: Home }]
},
{
path: '/foo',
components: { default: Home },
children: [{ path: '', component: Home }]
},
{
path: '/',
name: 'home',
Expand Down

0 comments on commit c1df447

Please sign in to comment.