0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-21 18:18:57 +01:00

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

* upd

* upd

* upd

* upd

* Add files via upload
This commit is contained in:
shray sharma 2024-10-31 03:50:41 +01:00 committed by GitHub
parent caeecf99a8
commit fea5947ea2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 9 deletions

View File

@ -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,
},
...config,
}
return async function timing(c, next) {

View File

@ -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