Skip to content

Commit 4bb989d

Browse files
committed
fix(types): remove unnecessary readonly
1 parent 6bbdbae commit 4bb989d

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

packages/router/src/matcher/pathParserRanker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Token, TokenType } from './pathTokenizer'
22
import { assign, isArray } from '../utils'
33

4-
export type PathParams = Record<string, string | readonly string[]>
4+
export type PathParams = Record<string, string | string[]>
55

66
/**
77
* A param in a url like `/users/:id`

packages/router/src/query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type LocationQueryValueRaw = LocationQueryValue | number | undefined
2828
*/
2929
export type LocationQuery = Record<
3030
string,
31-
LocationQueryValue | readonly LocationQueryValue[]
31+
LocationQueryValue | LocationQueryValue[]
3232
>
3333
/**
3434
* Loose {@link LocationQuery} object that can be passed to functions like
@@ -39,7 +39,7 @@ export type LocationQuery = Record<
3939
*/
4040
export type LocationQueryRaw = Record<
4141
string | number,
42-
LocationQueryValueRaw | readonly LocationQueryValueRaw[]
42+
LocationQueryValueRaw | LocationQueryValueRaw[]
4343
>
4444

4545
/**

packages/router/src/types/index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ export type RouteParamValue = string
3232
* @internal
3333
*/
3434
export type RouteParamValueRaw = RouteParamValue | number | null | undefined
35-
export type RouteParams = Record<
36-
string,
37-
RouteParamValue | readonly RouteParamValue[]
38-
>
35+
export type RouteParams = Record<string, RouteParamValue | RouteParamValue[]>
3936
export type RouteParamsRaw = Record<
4037
string,
41-
RouteParamValueRaw | readonly Exclude<RouteParamValueRaw, null | undefined>[]
38+
RouteParamValueRaw | Exclude<RouteParamValueRaw, null | undefined>[]
4239
>
4340

4441
/**
@@ -320,7 +317,7 @@ export interface RouteRecordSingleViewWithChildren extends _RouteRecordBase {
320317
/**
321318
* Array of nested routes.
322319
*/
323-
children: Readonly<RouteRecordRaw[]>
320+
children: RouteRecordRaw[]
324321

325322
/**
326323
* Allow passing down params as props to the component rendered by `router-view`.
@@ -356,7 +353,7 @@ export interface RouteRecordMultipleViewsWithChildren extends _RouteRecordBase {
356353
components?: Record<string, RawRouteComponent> | null | undefined
357354
component?: never
358355

359-
children: Readonly<RouteRecordRaw>[]
356+
children: RouteRecordRaw[]
360357

361358
/**
362359
* Allow passing down params as props to the component rendered by

0 commit comments

Comments
 (0)