From 4f550229f51f01ed2b6aacdacc8b6d0cd85473ba Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Sun, 31 Aug 2025 13:43:37 +0200 Subject: [PATCH] chore: comments and todos --- .../route-resolver/matchers/matcher-pattern.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 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 10d7bf93..e0f804ad 100644 --- a/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts +++ b/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts @@ -114,6 +114,7 @@ export type MatcherPatternPathDynamic_ParamOptions< /** * Helper type to extract the params from the options object. + * * @internal */ type ExtractParamTypeFromOptions = { @@ -126,6 +127,11 @@ type ExtractParamTypeFromOptions = { : never } +/** + * Helper type to extract the raw params from the options object. + * + * @internal + */ type ExtractLocationParamTypeFromOptions = { [K in keyof TParamsOptions]: TParamsOptions[K] extends MatcherPatternPathDynamic_ParamOptions< any, @@ -146,12 +152,8 @@ const RE_TRAILING_SLASHES = /\/*$/ /** * Handles the `path` part of a URL with dynamic parameters. */ -export class MatcherPatternPathDynamic< - TParamsOptions, - // TODO: | EmptyObject ? - // TParamsOptions extends Record, - // TParams extends MatcherParamsFormatted = ExtractParamTypeFromOptions -> implements +export class MatcherPatternPathDynamic + implements MatcherPatternPath< ExtractParamTypeFromOptions, ExtractLocationParamTypeFromOptions @@ -309,7 +311,7 @@ export type MatcherParamsFormatted = Record /** * Empty object in TS. */ -export type EmptyParams = Record // TODO: move to matcher-pattern +export type EmptyParams = Record /** * Possible values for query params in a matcher. -- 2.47.3