]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
fix(types): remove unnecessary readonly
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 5 Jul 2022 07:35:20 +0000 (09:35 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 5 Jul 2022 07:35:20 +0000 (09:35 +0200)
packages/router/src/matcher/pathParserRanker.ts
packages/router/src/query.ts
packages/router/src/types/index.ts

index 605d23266a0963b31d0183ce9210e04b2d89e527..0a98fd005fee9614149bd6581a3b1582c890f6fa 100644 (file)
@@ -1,7 +1,7 @@
 import { Token, TokenType } from './pathTokenizer'
 import { assign, isArray } from '../utils'
 
-export type PathParams = Record<string, string | readonly string[]>
+export type PathParams = Record<string, string | string[]>
 
 /**
  * A param in a url like `/users/:id`
index d315a84b8f17d01ae00bd068f58aa1b60720a622..94d9146182eff0049c0738c0f893c2d9e09588c5 100644 (file)
@@ -28,7 +28,7 @@ export type LocationQueryValueRaw = LocationQueryValue | number | undefined
  */
 export type LocationQuery = Record<
   string,
-  LocationQueryValue | readonly LocationQueryValue[]
+  LocationQueryValue | LocationQueryValue[]
 >
 /**
  * Loose {@link LocationQuery} object that can be passed to functions like
@@ -39,7 +39,7 @@ export type LocationQuery = Record<
  */
 export type LocationQueryRaw = Record<
   string | number,
-  LocationQueryValueRaw | readonly LocationQueryValueRaw[]
+  LocationQueryValueRaw | LocationQueryValueRaw[]
 >
 
 /**
index b693aa84a75aaf56628e4b048c2aac10e66d8adc..b13e936d9c05296bdec479543d7ffe9a4edcc65e 100644 (file)
@@ -32,13 +32,10 @@ export type RouteParamValue = string
  * @internal
  */
 export type RouteParamValueRaw = RouteParamValue | number | null | undefined
-export type RouteParams = Record<
-  string,
-  RouteParamValue | readonly RouteParamValue[]
->
+export type RouteParams = Record<string, RouteParamValue | RouteParamValue[]>
 export type RouteParamsRaw = Record<
   string,
-  RouteParamValueRaw | readonly Exclude<RouteParamValueRaw, null | undefined>[]
+  RouteParamValueRaw | Exclude<RouteParamValueRaw, null | undefined>[]
 >
 
 /**
@@ -320,7 +317,7 @@ export interface RouteRecordSingleViewWithChildren extends _RouteRecordBase {
   /**
    * Array of nested routes.
    */
-  children: Readonly<RouteRecordRaw[]>
+  children: RouteRecordRaw[]
 
   /**
    * Allow passing down params as props to the component rendered by `router-view`.
@@ -356,7 +353,7 @@ export interface RouteRecordMultipleViewsWithChildren extends _RouteRecordBase {
   components?: Record<string, RawRouteComponent> | null | undefined
   component?: never
 
-  children: Readonly<RouteRecordRaw>[]
+  children: RouteRecordRaw[]
 
   /**
    * Allow passing down params as props to the component rendered by