From: Eduardo San Martin Morote Date: Tue, 5 Jul 2022 07:35:20 +0000 (+0200) Subject: fix(types): remove unnecessary readonly X-Git-Tag: v4.1.1~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4bb989d36798243df1eb186c4ec01d9fd97d1f26;p=thirdparty%2Fvuejs%2Frouter.git fix(types): remove unnecessary readonly --- diff --git a/packages/router/src/matcher/pathParserRanker.ts b/packages/router/src/matcher/pathParserRanker.ts index 605d2326..0a98fd00 100644 --- a/packages/router/src/matcher/pathParserRanker.ts +++ b/packages/router/src/matcher/pathParserRanker.ts @@ -1,7 +1,7 @@ import { Token, TokenType } from './pathTokenizer' import { assign, isArray } from '../utils' -export type PathParams = Record +export type PathParams = Record /** * A param in a url like `/users/:id` diff --git a/packages/router/src/query.ts b/packages/router/src/query.ts index d315a84b..94d91461 100644 --- a/packages/router/src/query.ts +++ b/packages/router/src/query.ts @@ -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[] > /** diff --git a/packages/router/src/types/index.ts b/packages/router/src/types/index.ts index b693aa84..b13e936d 100644 --- a/packages/router/src/types/index.ts +++ b/packages/router/src/types/index.ts @@ -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 export type RouteParamsRaw = Record< string, - RouteParamValueRaw | readonly Exclude[] + RouteParamValueRaw | Exclude[] > /** @@ -320,7 +317,7 @@ export interface RouteRecordSingleViewWithChildren extends _RouteRecordBase { /** * Array of nested routes. */ - children: Readonly + 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 | null | undefined component?: never - children: Readonly[] + children: RouteRecordRaw[] /** * Allow passing down params as props to the component rendered by