]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: change to readonly
authorpikax <carlos@hypermob.co.uk>
Wed, 21 Apr 2021 10:19:43 +0000 (11:19 +0100)
committerEduardo San Martin Morote <posva@users.noreply.github.com>
Thu, 30 Jun 2022 07:59:00 +0000 (09:59 +0200)
src/matcher/index.ts
src/router.ts

index ce0bce664455c139ed6623d6011955354058b004..1756020e277ccb8d0f5000f9d48603b30e637c17 100644 (file)
@@ -56,7 +56,7 @@ export interface RouterMatcher {
  * @param globalOptions - global route options
  */
 export function createRouterMatcher(
-  routes: RouteRecordRaw[],
+  routes: Readonly<RouteRecordRaw[]>,
   globalOptions: PathParserOptions
 ): RouterMatcher {
   // normalized ordered array of matchers
index 76c720b7833c925eb01f89d047b3eadd242871ba..19d0160f84d0a64c0728d0b12fc85b8be7f130b9 100644 (file)
@@ -128,7 +128,7 @@ export interface RouterOptions extends PathParserOptions {
   /**
    * Initial list of routes that should be added to the router.
    */
-  routes: RouteRecordRaw[]
+  routes: Readonly<RouteRecordRaw[]>
   /**
    * Function to control scrolling when navigating between pages. Can return a
    * Promise to delay scrolling. Check {@link ScrollBehavior}.