Skip to content
Myr

fix(type): add missing S to RemoveBlankRecord (#1354)

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

* fix(type): add missing S to RemoveBlankRecord * fix(test): Fix testcase mistake * run prettier

authored by sizumita · committed by GitHub · parent 8adc8c1 · Browse files · 3 files+19 added−4 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+19 added−4 removed

  • tests:+13 added−0 removed
  • other:+6 added−4 removed

3 files+19 added−4 removed

modified:deno_dist/types.ts+2 added-2 removed
121 unmodified lines
122 I extends Input = {},123 O = {}124 >(125 ...handlers: Handler<E, P, I, O>[]126 ): Hono<E, RemoveBlankRecord<Schema<M, P, I['in'], O>>, BasePath>126 ): Hono<E, RemoveBlankRecord<S | Schema<M, P, I['in'], O>>, BasePath>127128 //// app.get(path, ...handlers[])129130 // app.get(path, handler)
298 unmodified lines
429////// Utilities //////430////// //////431////////////////////////////////////////432433export type ExtractSchema<T> = T extends Hono<infer _, infer S, any> ? S : never433export type ExtractSchema<T> = UnionToIntersection<T extends Hono<infer _, infer S, any> ? S : never>434435////////////////////////////////////////436////// //////437////// FetchEvent //////
9 unmodified lines
modified:src/types.test.ts+13 added
203 unmodified lines
204 }205 output: {}206 }207 }208 } & {209 '/foo/:foo/books/:id': {210 $post: {211 input: {212 param: {213 id: string214 } & {215 foo: string216 }217 }218 output: {}219 }220 }221 }222 type verify = Expect<Equal<Expected, Actual>>223 })224 })
295 unmodified lines
modified:src/types.ts+4 added-2 removed
121 unmodified lines
122 I extends Input = {},123 O = {}124 >(125 ...handlers: Handler<E, P, I, O>[]126 ): Hono<E, RemoveBlankRecord<Schema<M, P, I['in'], O>>, BasePath>126 ): Hono<E, RemoveBlankRecord<S | Schema<M, P, I['in'], O>>, BasePath>127128 //// app.get(path, ...handlers[])129130 // app.get(path, handler)
298 unmodified lines
429////// Utilities //////430////// //////431////////////////////////////////////////432433export type ExtractSchema<T> = T extends Hono<infer _, infer S, any> ? S : never433export type ExtractSchema<T> = UnionToIntersection<434 T extends Hono<infer _, infer S, any> ? S : never435>436437////////////////////////////////////////438////// //////439////// FetchEvent //////
9 unmodified lines