File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export interface Location {
108108 name ?: string ;
109109 path ?: string ;
110110 hash ?: string ;
111- query ?: Dictionary < string | string [ ] > ;
111+ query ?: Dictionary < string | ( string | null ) [ ] | null | undefined > ;
112112 params ?: Dictionary < string > ;
113113 append ?: boolean ;
114114 replace ?: boolean ;
@@ -118,7 +118,7 @@ export interface Route {
118118 path : string ;
119119 name ?: string ;
120120 hash : string ;
121- query : Dictionary < string | string [ ] > ;
121+ query : Dictionary < string | ( string | null ) [ ] > ;
122122 params : Dictionary < string > ;
123123 fullPath : string ;
124124 matched : RouteRecord [ ] ;
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ const route: Route = router.currentRoute;
105105const path : string = route . path ;
106106const name : string | undefined = route . name ;
107107const hash : string = route . hash ;
108- const query : string | string [ ] = route . query [ "foo" ] ;
108+ const query : string | ( string | null ) [ ] | null = route . query [ "foo" ] ;
109109const params : string = route . params [ "bar" ] ;
110110const fullPath : string = route . fullPath ;
111111const redirectedFrom : string | undefined = route . redirectedFrom ;
@@ -149,6 +149,9 @@ router.push({
149149 } ,
150150 query : {
151151 bar : "bar" ,
152+ empty : null ,
153+ removed : undefined ,
154+ withEmpty : [ "1" , null ] ,
152155 foo : [ "foo1" , "foo2" ]
153156 } ,
154157 hash : "hash"
You can’t perform that action at this time.
0 commit comments