diff --git a/src/rest.ts b/src/rest.ts index 1b650f8e7..47cc23076 100644 --- a/src/rest.ts +++ b/src/rest.ts @@ -12,7 +12,7 @@ function createRestHandler( ) { return < RequestBodyType extends DefaultBodyType = DefaultBodyType, - Params extends PathParams = PathParams, + Params extends PathParams = PathParams, ResponseBody extends DefaultBodyType = DefaultBodyType, >( path: Path, diff --git a/src/utils/matching/matchRequestUrl.ts b/src/utils/matching/matchRequestUrl.ts index d0b8c10fe..7a325d2ba 100644 --- a/src/utils/matching/matchRequestUrl.ts +++ b/src/utils/matching/matchRequestUrl.ts @@ -3,8 +3,8 @@ import { getCleanUrl } from '@mswjs/interceptors/lib/utils/getCleanUrl' import { normalizePath } from './normalizePath' export type Path = string | RegExp -export type PathParams>> = { - [K in keyof T]?: string | ReadonlyArray +export type PathParams = { + [P in K]?: string | ReadonlyArray } export interface Match {