hono 4.11.2 → 4.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/types.d.ts +2 -1
- package/package.json +1 -1
package/dist/types/types.d.ts
CHANGED
|
@@ -532,7 +532,8 @@ export type TypedResponse<T = unknown, U extends StatusCode = StatusCode, F exte
|
|
|
532
532
|
_format: F;
|
|
533
533
|
};
|
|
534
534
|
type MergeTypedResponse<T> = T extends Promise<void> ? T : T extends Promise<infer T2> ? T2 extends TypedResponse ? T2 : TypedResponse : T extends TypedResponse ? T : TypedResponse;
|
|
535
|
-
type
|
|
535
|
+
type ExtractTypedResponseOnly<T> = T extends TypedResponse ? T : never;
|
|
536
|
+
type MergeMiddlewareResponse<T> = T extends (c: any, next: any) => Promise<infer R> ? Exclude<R, void> extends never ? never : Exclude<R, void> extends Response | TypedResponse<any, any, any> ? ExtractTypedResponseOnly<Exclude<R, void>> : never : T extends (c: any, next: any) => infer R ? R extends Response | TypedResponse<any, any, any> ? ExtractTypedResponseOnly<R> : never : never;
|
|
536
537
|
export type FormValue = string | Blob;
|
|
537
538
|
export type ParsedFormValue = string | File;
|
|
538
539
|
export type ValidationTargets<T extends FormValue = ParsedFormValue, P extends string = string> = {
|