Skip to content
Myr

refactor(timing/utils-body): a few minor edits (#3557)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* upd * upd * upd * upd * Add files via upload

authored by shray sharma · committed by GitHub · parent caeecf9 · Browse files · 2 files+7 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−9 removed

  • other:+7 added−9 removed

2 files+7 added−9 removed

modified:src/middleware/timing/timing.ts+5 added-7 removed
73 unmodified lines
74 * ```75 */76export const timing = (config?: TimingOptions): MiddlewareHandler => {77 const options: TimingOptions = {78 ...{79 total: true,80 enabled: true,81 totalDescription: 'Total Response Time',82 autoEnd: true,83 crossOrigin: false,78 total: true,79 enabled: true,80 totalDescription: 'Total Response Time',81 autoEnd: true,82 crossOrigin: false,84 },83 ...config,84 }85 return async function timing(c, next) {86 const headers: string[] = []
137 unmodified lines
modified:src/utils/body.ts+2 added-2 removed
3 unmodified lines
4 */56import { HonoRequest } from '../request'78type BodyDataValueDot = { [x: string]: string | File | BodyDataValueDot } & {}8type BodyDataValueDot = { [x: string]: string | File | BodyDataValueDot }9type BodyDataValueDotAll = {10 [x: string]: string | File | (string | File)[] | BodyDataValueDotAll11} & {}11}12type SimplifyBodyData<T> = {13 [K in keyof T]: string | File | (string | File)[] | BodyDataValueDotAll extends T[K]14 ? string | File | (string | File)[] | BodyDataValueDotAll15 : string | File | BodyDataValueDot extends T[K]
210 unmodified lines