]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
Change type to LocationQueryValue to accurately reflect source. (#1398)
authormaximoosemine <42452897+maximoosemine@users.noreply.github.com>
Sat, 14 May 2022 23:51:29 +0000 (16:51 -0700)
committerGitHub <noreply@github.com>
Sat, 14 May 2022 23:51:29 +0000 (01:51 +0200)
In the source, the type of RouteLocationNormalized.query is a Record<string, LocationQueryValue | LocationQueryValue[]>.  LocationQueryValue isn't exactly a string, but is a (string | null). I think it makes sense to update the docs, especially since LocationQueryValue isn't assignable to string.

docs/api/index.md

index 6adb520155378ecac44887fb7079dffbe3e5ee83..08f506dca117e5053dbb09688ba35f375dc35246 100644 (file)
@@ -1010,7 +1010,7 @@ Normalized route location. Does not have any [redirect records](#routerecordraw)
 
 ### query
 
-- **Type**: `Record<string, string | string[]>`
+- **Type**: `Record<string, LocationQueryValue | LocationQueryValue[]>`
 - **Details**:
 
   Dictionary of decoded query params extracted from the `search` section of the URL.