]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: expose createRouterMatcher as internal
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 3 Aug 2020 08:56:50 +0000 (10:56 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 3 Aug 2020 08:56:50 +0000 (10:56 +0200)
src/index.ts
src/matcher/index.ts

index ce896361f10aeea5ce94d359b4a7f4ac0555a983..d16365921a82f99c7755f88859da02f031b7ad0a 100644 (file)
@@ -8,6 +8,7 @@ import { Router } from './router'
 export { createWebHistory } from './history/html5'
 export { createMemoryHistory } from './history/memory'
 export { createWebHashHistory } from './history/hash'
+export { createRouterMatcher } from './matcher'
 
 export {
   LocationQuery,
index cf2d92134c1ee01bbe28485f16a3d97e7d60080a..7111a18d6a054fcf68ab837f2f5655a5ea6a780b 100644 (file)
@@ -26,12 +26,26 @@ interface RouterMatcher {
   }
   getRoutes: () => RouteRecordMatcher[]
   getRecordMatcher: (name: RouteRecordName) => RouteRecordMatcher | undefined
+
+  /**
+   * Resolves a location. Gives access to the route record that corresponds to the actual path as well as filling the corresponding params objects
+   *
+   * @param location - MatcherLocationRaw to resolve to a url
+   * @param currentLocation - MatcherLocation of the current location
+   */
   resolve: (
     location: MatcherLocationRaw,
     currentLocation: MatcherLocation
   ) => MatcherLocation
 }
 
+/**
+ * Creates a Router Matcher.
+ *
+ * @internal
+ * @param routes - array of initial routes
+ * @param globalOptions - global route options
+ */
 export function createRouterMatcher(
   routes: RouteRecordRaw[],
   globalOptions: PathParserOptions
@@ -192,12 +206,6 @@ export function createRouterMatcher(
       matcherMap.set(matcher.record.name, matcher)
   }
 
-  /**
-   * Resolves a location. Gives access to the route record that corresponds to the actual path as well as filling the corresponding params objects
-   *
-   * @param location - MatcherLocationRaw to resolve to a url
-   * @param currentLocation - MatcherLocation of the current location
-   */
   function resolve(
     location: Readonly<MatcherLocationRaw>,
     currentLocation: Readonly<MatcherLocation>