diff --git a/src/types.ts b/src/types.ts index bfa96a260..634af5d67 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1980,13 +1980,11 @@ export type RemoveQuestion = T extends `${infer R}?` ? R : T ////// ////// //////////////////////////////////////// -export type ExtractSchema = UnionToIntersection< - T extends HonoBase ? S : never -> +export type ExtractSchema = T extends HonoBase ? S : never -type EnvOrEmpty = T extends Env ? (Env extends T ? {} : T) : T +type ProcessHead = IfAnyThenEmptyObject export type IntersectNonAnyTypes = T extends [infer Head, ...infer Rest] - ? IfAnyThenEmptyObject> & IntersectNonAnyTypes + ? ProcessHead & IntersectNonAnyTypes : {} ////////////////////////////////////////