@@ -114,6 +114,7 @@ export type MatcherPatternPathDynamic_ParamOptions<
114
114
115
115
/**
116
116
* Helper type to extract the params from the options object.
117
+ *
117
118
* @internal
118
119
*/
119
120
type ExtractParamTypeFromOptions < TParamsOptions > = {
@@ -126,6 +127,11 @@ type ExtractParamTypeFromOptions<TParamsOptions> = {
126
127
: never
127
128
}
128
129
130
+ /**
131
+ * Helper type to extract the raw params from the options object.
132
+ *
133
+ * @internal
134
+ */
129
135
type ExtractLocationParamTypeFromOptions < TParamsOptions > = {
130
136
[ K in keyof TParamsOptions ] : TParamsOptions [ K ] extends MatcherPatternPathDynamic_ParamOptions <
131
137
any ,
@@ -146,12 +152,8 @@ const RE_TRAILING_SLASHES = /\/*$/
146
152
/**
147
153
* Handles the `path` part of a URL with dynamic parameters.
148
154
*/
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
155
157
MatcherPatternPath <
156
158
ExtractParamTypeFromOptions < TParamsOptions > ,
157
159
ExtractLocationParamTypeFromOptions < TParamsOptions >
@@ -309,7 +311,7 @@ export type MatcherParamsFormatted = Record<string, unknown>
309
311
/**
310
312
* Empty object in TS.
311
313
*/
312
- export type EmptyParams = Record < PropertyKey , never > // TODO: move to matcher-pattern
314
+ export type EmptyParams = Record < PropertyKey , never >
313
315
314
316
/**
315
317
* Possible values for query params in a matcher.
0 commit comments