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
4 changes: 2 additions & 2 deletions types/router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface Location {
name?: string;
path?: string;
hash?: string;
query?: Dictionary<string>;
query?: Dictionary<string | string[]>;
params?: Dictionary<string>;
append?: boolean;
replace?: boolean;
Expand All @@ -117,7 +117,7 @@ export interface Route {
path: string;
name?: string;
hash: string;
query: Dictionary<string>;
query: Dictionary<string | string[]>;
params: Dictionary<string>;
fullPath: string;
matched: RouteRecord[];
Expand Down
5 changes: 3 additions & 2 deletions types/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const route: Route = router.currentRoute;
const path: string = route.path;
const name: string | undefined = route.name;
const hash: string = route.hash;
const query: string = route.query["foo"];
const query: string | string[] = route.query["foo"];
const params: string = route.params["bar"];
const fullPath: string = route.fullPath;
const redirectedFrom: string | undefined = route.redirectedFrom;
Expand Down Expand Up @@ -148,7 +148,8 @@ router.push({
foo: "foo"
},
query: {
bar: "bar"
bar: "bar",
foo: ["foo1", "foo2"]
},
hash: "hash"
});
Expand Down