diff --git a/src/middleware/timing/timing.ts b/src/middleware/timing/timing.ts index d387f43b..90d3ac1b 100644 --- a/src/middleware/timing/timing.ts +++ b/src/middleware/timing/timing.ts @@ -75,13 +75,11 @@ const getTime = (): number => { */ export const timing = (config?: TimingOptions): MiddlewareHandler => { const options: TimingOptions = { - ...{ - total: true, - enabled: true, - totalDescription: 'Total Response Time', - autoEnd: true, - crossOrigin: false, - }, + total: true, + enabled: true, + totalDescription: 'Total Response Time', + autoEnd: true, + crossOrigin: false, ...config, } return async function timing(c, next) { diff --git a/src/utils/body.ts b/src/utils/body.ts index 81fff6a8..de94080c 100644 --- a/src/utils/body.ts +++ b/src/utils/body.ts @@ -5,10 +5,10 @@ import { HonoRequest } from '../request' -type BodyDataValueDot = { [x: string]: string | File | BodyDataValueDot } & {} +type BodyDataValueDot = { [x: string]: string | File | BodyDataValueDot } type BodyDataValueDotAll = { [x: string]: string | File | (string | File)[] | BodyDataValueDotAll -} & {} +} type SimplifyBodyData = { [K in keyof T]: string | File | (string | File)[] | BodyDataValueDotAll extends T[K] ? string | File | (string | File)[] | BodyDataValueDotAll