Skip to content

Commit 4f55022

Browse files
committed
chore: comments and todos
1 parent d75157b commit 4f55022

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export type MatcherPatternPathDynamic_ParamOptions<
114114

115115
/**
116116
* Helper type to extract the params from the options object.
117+
*
117118
* @internal
118119
*/
119120
type ExtractParamTypeFromOptions<TParamsOptions> = {
@@ -126,6 +127,11 @@ type ExtractParamTypeFromOptions<TParamsOptions> = {
126127
: never
127128
}
128129

130+
/**
131+
* Helper type to extract the raw params from the options object.
132+
*
133+
* @internal
134+
*/
129135
type ExtractLocationParamTypeFromOptions<TParamsOptions> = {
130136
[K in keyof TParamsOptions]: TParamsOptions[K] extends MatcherPatternPathDynamic_ParamOptions<
131137
any,
@@ -146,12 +152,8 @@ const RE_TRAILING_SLASHES = /\/*$/
146152
/**
147153
* Handles the `path` part of a URL with dynamic parameters.
148154
*/
149-
export class MatcherPatternPathDynamic<
150-
TParamsOptions,
151-
// TODO: | EmptyObject ?
152-
// TParamsOptions extends Record<string, MatcherPatternPathCustomParamOptions>,
153-
// TParams extends MatcherParamsFormatted = ExtractParamTypeFromOptions<TParamsOptions>
154-
> implements
155+
export class MatcherPatternPathDynamic<TParamsOptions>
156+
implements
155157
MatcherPatternPath<
156158
ExtractParamTypeFromOptions<TParamsOptions>,
157159
ExtractLocationParamTypeFromOptions<TParamsOptions>
@@ -309,7 +311,7 @@ export type MatcherParamsFormatted = Record<string, unknown>
309311
/**
310312
* Empty object in TS.
311313
*/
312-
export type EmptyParams = Record<PropertyKey, never> // TODO: move to matcher-pattern
314+
export type EmptyParams = Record<PropertyKey, never>
313315

314316
/**
315317
* Possible values for query params in a matcher.

0 commit comments

Comments
 (0)