Skip to content
Myr

fix(client): ignore `header` and `cookie` types (#1359)

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

* fix(client): ignore `header` and `cookie` types * denoify

authored by Yusuke Wada · committed by GitHub · parent 07bc29e · Browse files · 5 files+33 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

5 files+33 added−11 removed

  • tests:+12 added−0 removed
  • other:+21 added−11 removed

5 files+33 added−11 removed

modified:deno_dist/client/types.ts+5 added-1 removed
modified:deno_dist/types.ts+7 added-5 removed
96 unmodified lines
97 O = {},98 I extends Input = {},99 I2 extends Input = I,100 I3 extends Input = I & I2,101 I4 extends Input = I2 & I3101 I4 extends Input = I & I2 & I3102 >(103 ...handlers: [H<E, P, I, O>, H<E, P, I2, O>, H<E, P, I3, O>, H<E, P, I4, O>]104 ): Hono<E, RemoveBlankRecord<S | Schema<M, P, I4['in'], O>>, BasePath>105
4 unmodified lines
110 I extends Input = {},111 I2 extends Input = I,112 I3 extends Input = I & I2,113 I4 extends Input = I2 & I3,114 I5 extends Input = I3 & I4114 I5 extends Input = I & I2 & I3 & I4115 >(116 ...handlers: [H<E, P, I, O>, H<E, P, I2, O>, H<E, P, I3, O>, H<E, P, I4, O>, H<E, P, I5, O>]117 ): Hono<E, RemoveBlankRecord<S | Schema<M, P, I5['in'], O>>, BasePath>118
36 unmodified lines
155 O = {},156 I extends Input = {},157 I2 extends Input = I,158 I3 extends Input = I & I2,159 I4 extends Input = I2 & I3159 I4 extends Input = I & I2 & I3160 >(161 path: P,162 ...handlers: [163 H<E, MergePath<BasePath, P>, I, O>,
10 unmodified lines
174 I extends Input = {},175 I2 extends Input = I,176 I3 extends Input = I & I2,177 I4 extends Input = I2 & I3,178 I5 extends Input = I3 & I4178 I5 extends Input = I & I2 & I3 & I4179 >(180 path: P,181 ...handlers: [182 H<E, MergePath<BasePath, P>, I, O>,
246 unmodified lines
429////// Utilities //////430////// //////431////////////////////////////////////////432433export type ExtractSchema<T> = UnionToIntersection<T extends Hono<infer _, infer S, any> ? S : never>433export type ExtractSchema<T> = UnionToIntersection<434 T extends Hono<infer _, infer S, any> ? S : never435>436437////////////////////////////////////////438////// //////439////// FetchEvent //////
9 unmodified lines
modified:src/client/client.test.ts+12 added
23 unmodified lines
2425 const route = app26 .post(27 '/posts',28 // Client does not support `cookie`29 validator('cookie', () => {30 return {} as {31 debug: string32 }33 }),34 // Client does not support `header`35 validator('header', () => {36 return {} as {37 'x-request-id': string38 }39 }),40 validator('json', () => {41 return {} as {42 id: number43 title: string
404 unmodified lines
modified:src/client/types.ts+5 added-1 removed
modified:src/types.ts+4 added-4 removed
96 unmodified lines
97 O = {},98 I extends Input = {},99 I2 extends Input = I,100 I3 extends Input = I & I2,101 I4 extends Input = I2 & I3101 I4 extends Input = I & I2 & I3102 >(103 ...handlers: [H<E, P, I, O>, H<E, P, I2, O>, H<E, P, I3, O>, H<E, P, I4, O>]104 ): Hono<E, RemoveBlankRecord<S | Schema<M, P, I4['in'], O>>, BasePath>105
4 unmodified lines
110 I extends Input = {},111 I2 extends Input = I,112 I3 extends Input = I & I2,113 I4 extends Input = I2 & I3,114 I5 extends Input = I3 & I4114 I5 extends Input = I & I2 & I3 & I4115 >(116 ...handlers: [H<E, P, I, O>, H<E, P, I2, O>, H<E, P, I3, O>, H<E, P, I4, O>, H<E, P, I5, O>]117 ): Hono<E, RemoveBlankRecord<S | Schema<M, P, I5['in'], O>>, BasePath>118
36 unmodified lines
155 O = {},156 I extends Input = {},157 I2 extends Input = I,158 I3 extends Input = I & I2,159 I4 extends Input = I2 & I3159 I4 extends Input = I & I2 & I3160 >(161 path: P,162 ...handlers: [163 H<E, MergePath<BasePath, P>, I, O>,
10 unmodified lines
174 I extends Input = {},175 I2 extends Input = I,176 I3 extends Input = I & I2,177 I4 extends Input = I2 & I3,178 I5 extends Input = I3 & I4178 I5 extends Input = I & I2 & I3 & I4179 >(180 path: P,181 ...handlers: [182 H<E, MergePath<BasePath, P>, I, O>,
266 unmodified lines