mirror of
https://github.com/honojs/hono.git
synced 2024-11-24 11:07:29 +01:00
refactor(timing/utils-body): a few minor edits (#3557)
* upd * upd * upd * upd * Add files via upload
This commit is contained in:
parent
caeecf99a8
commit
fea5947ea2
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user