Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export interface Location {

export interface Route {
path: string
name?: string
name?: string | null
hash: string
query: Dictionary<string | (string | null)[]>
params: Dictionary<string>
Expand Down
4 changes: 2 additions & 2 deletions types/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const mode: string = router.mode

const route: Route = router.currentRoute
const path: string = route.path
const name: string | undefined = route.name
const name: string | undefined | null = route.name
const hash: string = route.hash
const query: string | (string | null)[] | null = route.query['foo']
const params: string = route.params['bar']
Expand All @@ -128,7 +128,7 @@ matched.forEach(m => {
[key: string]: ComponentOptions<Vue> | typeof Vue | AsyncComponent
} = m.components
const instances: { [key: string]: Vue } = m.instances
const name: string | undefined = m.name
const name: string | undefined | null = m.name
const parant: RouteRecord | undefined = m.parent
const redirect: RedirectOption | undefined = m.redirect
})
Expand Down