diff --git a/src/types.ts b/src/types.ts index bfa96a260..68f3a9859 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1984,9 +1984,9 @@ export type ExtractSchema = UnionToIntersection< 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 : {} ////////////////////////////////////////