From 1c0718f61bea2a7db1f153ed5690a76ba2b1a268 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 10 Oct 2025 11:12:09 +0200 Subject: [PATCH] docs: jsdoc --- .../route-resolver/matchers/matcher-pattern.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts b/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts index af7f0463..9fb0a801 100644 --- a/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts +++ b/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts @@ -167,6 +167,14 @@ export class MatcherPatternPathDynamic */ private paramsKeys: Array + /** + * Creates a new dynamic path matcher. + * + * @param re - regex to match the path against + * @param params - object of param parsers as {@link MatcherPatternPathDynamic_ParamOptions} + * @param pathParts - array of path parts, where strings are static parts, 1 are regular params, and 0 are splat params (not encode slash) + * @param trailingSlash - whether the path should end with a trailing slash, null means "do not care" (for trailing splat params) + */ constructor( readonly re: RegExp, // NOTE: this version instead of extends allows the constructor @@ -174,9 +182,7 @@ export class MatcherPatternPathDynamic // otherwise, we need to use a factory function: https://github.com/microsoft/TypeScript/issues/40451 readonly params: TParamsOptions & Record>, - // 1 means a regular param, 0 means a splat, the order comes from the keys in params readonly pathParts: Array>, - // null means "do not care", it's only for splat params readonly trailingSlash: boolean | null = false ) { this.paramsKeys = Object.keys(this.params) as Array -- 2.47.3