From: Eduardo San Martin Morote Date: Sun, 31 Aug 2025 11:43:37 +0000 (+0200) Subject: chore: comments and todos X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f550229f51f01ed2b6aacdacc8b6d0cd85473ba;p=thirdparty%2Fvuejs%2Frouter.git chore: comments and todos --- 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.