Skip to content
Myr

feat: change the arg `InferResponseType` receives (#893)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* feat: change the arg `InferResponseType` receives * denoify

authored by Yusuke Wada · committed by GitHub · parent 733854f · Browse files · 3 files+4 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+4 added−11 removed

  • tests:+2 added−1 removed
  • other:+2 added−10 removed

3 files+4 added−11 removed

modified:deno_dist/client/types.ts+1 added-5 removed
modified:src/client/client.test.ts+2 added-1 removed
236 unmodified lines
237 type AppType = typeof route238239 it('Should infer the type correctly', () => {240 const client = hc<AppType>('/')241 const req = client.index.$get242242 type Actual = InferResponseType<typeof client.index>243 type Actual = InferResponseType<typeof req>244 type Expected = {245 id: number246 title: string247 }
3 unmodified lines
modified:src/client/types.ts+1 added-5 removed