import type { Context } from '../context'
import { getCookie } from '../helper/cookie'
import { HTTPException } from '../http-exception'
import type { Env , MiddlewareHandler , TypedResponse , ValidationTargets } from '../types'
import type { Env , MiddlewareHandler , TypedResponse , ValidationTargets , FormValue } from '../types'
import type { BodyData } from '../utils/body'
import { bufferToFormData } from '../utils/buffer'
type ValidationTargetKeysWithBody = 'form' | 'json'
[ K in U ] : K extends 'json'
? unknown extends InputType
? ExtractValidatorOutput < VF >
: InputType
: { [ K2 in keyof ExtractValidatorOutput < VF >] : ValidationTargets [ K ][ K2 ] }
: { [ K2 in keyof ExtractValidatorOutput < VF >] : ValidationTargets < FormValue > [ K ][ K2 ] }
}
out : { [ K in U ] : ExtractValidatorOutput < VF > }
} = {
in : {
[ K in U ] : K extends 'json'
? unknown extends InputType
? ExtractValidatorOutput < VF >
: InputType
: { [ K2 in keyof ExtractValidatorOutput < VF >] : ValidationTargets [ K ][ K2 ] }
: { [ K2 in keyof ExtractValidatorOutput < VF >] : ValidationTargets < FormValue > [ K ][ K2 ] }
}
out : { [ K in U ] : ExtractValidatorOutput < VF > }
} ,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
102 unmodified lines
Expand all