@@ -1148,21 +1148,22 @@ type InlineResponse =
11481148 | BunHTMLBundlelike
11491149
11501150type LastOf < T > =
1151- UnionToIntersect < T extends any ? ( ) => T : never > extends ( ) => infer R
1152- ? R
1153- : never ;
1151+ UnionToIntersect < T extends any ? ( ) => T : never > extends ( ) => infer R
1152+ ? R
1153+ : never
11541154
1155- type Push < T extends any [ ] , V > = [ ...T , V ] ;
1155+ type Push < T extends any [ ] , V > = [ ...T , V ]
11561156
1157- type TuplifyUnion < T , L = LastOf < T > , N = [ T ] extends [ never ] ? true : false > =
1158- true extends N
1159- ? [ ]
1160- : Push < TuplifyUnion < Exclude < T , L > > , L > ;
1157+ type TuplifyUnion <
1158+ T ,
1159+ L = LastOf < T > ,
1160+ N = [ T ] extends [ never ] ? true : false
1161+ > = true extends N ? [ ] : Push < TuplifyUnion < Exclude < T , L > > , L >
11611162
1162- export type Tuple < T , A extends T [ ] = [ ] > =
1163- TuplifyUnion < T > [ 'length' ] extends A [ 'length' ]
1164- ? [ ... A ]
1165- : Tuple < T , [ T , ...A ] > ;
1163+ export type Tuple <
1164+ T ,
1165+ A extends T [ ] = [ ]
1166+ > = TuplifyUnion < T > [ 'length' ] extends A [ 'length' ] ? [ ... A ] : Tuple < T , [ T , ...A ] >
11661167
11671168export type InlineHandler <
11681169 Route extends RouteSchema = { } ,
@@ -2216,10 +2217,10 @@ type PartialIf<T, Condition extends boolean> = Condition extends true
22162217// Exclude return error()
22172218export type ExcludeElysiaResponse < T > = PartialIf <
22182219 Exclude < Awaited < T > , AnyElysiaCustomStatusResponse > extends infer A
2219- ? IsNever < A > extends true
2220+ ? IsNever < A & { } > extends true
22202221 ? { }
22212222 : // Intersect all union and fallback never to {}
2222- UnionToIntersect < A & { } >
2223+ A & { }
22232224 : { } ,
22242225 undefined extends Awaited < T > ? true : false
22252226>
0 commit comments