File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
pkgs/typed-api-spec/src/msw Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 11import { describe , it , expect , vi } from "vitest" ;
2- import { http , HttpResponse } from "msw" ;
2+ import { HttpResponse } from "msw" ;
33import { setupServer } from "msw/node" ;
4- import { Http , HttpResponse as HttpResponseT , newHttp } from "./index" ;
5- import { ApiP , DefineApiEndpoints } from "../core" ;
4+ import { HttpResponse as HttpResponseT , newHttp } from "./index" ;
5+ import { ApiP } from "../core" ;
66import { z } from "zod" ;
77import { ApiEndpointsSchema , ToApiEndpoints } from "../core" ;
88
Original file line number Diff line number Diff line change @@ -120,14 +120,13 @@ export const newHttp = <
120120 baseUrl : BaseUrl ,
121121 endpoints : ES ,
122122) : Http < BaseUrl , ES > => {
123- const { req, res } = newValidator ( endpoints ) ;
123+ const { req } = newValidator ( endpoints ) ;
124124 return new Proxy ( http , {
125125 get ( target , prop , receiver ) {
126- // o is the original method of the provided router
127126 const requestHandler = Reflect . get ( target , prop , receiver ) ;
128- // if (prop === "all") {
129- // return requestHandler;
130- // }
127+ if ( prop === "all" ) {
128+ return requestHandler ;
129+ }
131130 return <
132131 // FIXME: Record<string, string> should be PathParams<keyof Params>
133132 Params extends Record < string , string > = Record < string , string > ,
You can’t perform that action at this time.
0 commit comments