From 4f8c6c6a80121ba60e41935b61f55377b22fec43 Mon Sep 17 00:00:00 2001 From: pikax Date: Wed, 21 Apr 2021 11:19:43 +0100 Subject: [PATCH] chore: change to readonly --- src/matcher/index.ts | 2 +- src/router.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matcher/index.ts b/src/matcher/index.ts index ce0bce66..1756020e 100644 --- a/src/matcher/index.ts +++ b/src/matcher/index.ts @@ -56,7 +56,7 @@ export interface RouterMatcher { * @param globalOptions - global route options */ export function createRouterMatcher( - routes: RouteRecordRaw[], + routes: Readonly, globalOptions: PathParserOptions ): RouterMatcher { // normalized ordered array of matchers diff --git a/src/router.ts b/src/router.ts index 76c720b7..19d0160f 100644 --- a/src/router.ts +++ b/src/router.ts @@ -128,7 +128,7 @@ export interface RouterOptions extends PathParserOptions { /** * Initial list of routes that should be added to the router. */ - routes: RouteRecordRaw[] + routes: Readonly /** * Function to control scrolling when navigating between pages. Can return a * Promise to delay scrolling. Check {@link ScrollBehavior}. -- 2.47.3