/**
* Helper type to extract the params from the options object.
+ *
* @internal
*/
type ExtractParamTypeFromOptions<TParamsOptions> = {
: never
}
+/**
+ * Helper type to extract the raw params from the options object.
+ *
+ * @internal
+ */
type ExtractLocationParamTypeFromOptions<TParamsOptions> = {
[K in keyof TParamsOptions]: TParamsOptions[K] extends MatcherPatternPathDynamic_ParamOptions<
any,
/**
* Handles the `path` part of a URL with dynamic parameters.
*/
-export class MatcherPatternPathDynamic<
- TParamsOptions,
- // TODO: | EmptyObject ?
- // TParamsOptions extends Record<string, MatcherPatternPathCustomParamOptions>,
- // TParams extends MatcherParamsFormatted = ExtractParamTypeFromOptions<TParamsOptions>
-> implements
+export class MatcherPatternPathDynamic<TParamsOptions>
+ implements
MatcherPatternPath<
ExtractParamTypeFromOptions<TParamsOptions>,
ExtractLocationParamTypeFromOptions<TParamsOptions>
/**
* Empty object in TS.
*/
-export type EmptyParams = Record<PropertyKey, never> // TODO: move to matcher-pattern
+export type EmptyParams = Record<PropertyKey, never>
/**
* Possible values for query params in a matcher.