We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e24ee18 commit db3b5faCopy full SHA for db3b5fa
packages/io-ts-http/src/httpRoute.ts
@@ -13,10 +13,8 @@ export const Method = t.keyof({
13
14
export type Method = t.TypeOf<typeof Method>;
15
16
-export type PathString = `/${string}`;
17
-
18
export type HttpRoute<M extends Method = Method> = {
19
- readonly path: PathString;
+ readonly path: string;
20
readonly method: Uppercase<M>;
21
readonly request: HttpRequestCodec<any>;
22
readonly response: HttpResponse;
packages/superagent-wrapper/src/request.ts
@@ -201,7 +201,7 @@ export const requestForRoute =
201
let path = route.path;
202
for (const key in reqProps.params) {
203
if (reqProps.params.hasOwnProperty(key)) {
204
- path = path.replace(`{${key}}`, reqProps.params[key]) as h.PathString;
+ path = path.replace(`{${key}}`, reqProps.params[key]);
205
}
206
207
0 commit comments