From: pikax Date: Wed, 21 Apr 2021 10:19:43 +0000 (+0100) Subject: chore: change to readonly X-Git-Tag: v4.1.0~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f8c6c6a80121ba60e41935b61f55377b22fec43;p=thirdparty%2Fvuejs%2Frouter.git chore: change to readonly --- 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}.