Skip to content

Commit

Permalink
refactor(timing/utils-body): a few minor edits (honojs#3557)
Browse files Browse the repository at this point in the history
* upd

* upd

* upd

* upd

* Add files via upload
  • Loading branch information
sharma-shray authored and TinsFox committed Nov 11, 2024
1 parent 29157cd commit 1c574ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions src/middleware/timing/timing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> = {
[K in keyof T]: string | File | (string | File)[] | BodyDataValueDotAll extends T[K]
? string | File | (string | File)[] | BodyDataValueDotAll
Expand Down

0 comments on commit 1c574ee

Please sign in to comment.