Skip to content

Commit

Permalink
Merge 85a3ecf into 502709f
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Jan 18, 2025
2 parents 502709f + 85a3ecf commit db775aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1984,9 +1984,9 @@ export type ExtractSchema<T> = UnionToIntersection<
T extends HonoBase<infer _, infer S, any> ? S : never
>

type EnvOrEmpty<T> = T extends Env ? (Env extends T ? {} : T) : T
type ProcessHead<T> = IfAnyThenEmptyObject<T extends Env ? (Env extends T ? {} : T) : T>
export type IntersectNonAnyTypes<T extends any[]> = T extends [infer Head, ...infer Rest]
? IfAnyThenEmptyObject<EnvOrEmpty<Head>> & IntersectNonAnyTypes<Rest>
? ProcessHead<Head> & IntersectNonAnyTypes<Rest>
: {}

////////////////////////////////////////
Expand Down

0 comments on commit db775aa

Please sign in to comment.