typia.http.formData() is a function decoding FormData instance, with
automatic type casting to the expected type. When roperty type be defined
as boolean or Blob type, typia.http.formData() will cast the value to
the expected type when decoding.
By the way, as FormData is not enough to express complex data structures,
typia.http.formData() function has some limitations. If target type T is
not following those restrictions, compilation errors would be occured.
Type T must be an object type
Do not allow dynamic property
Only boolean, bigint, number, string, Blob, File or their array types are allowed
By the way, union type never be not allowed
Also, typia.http.formData() function does not perform validation about the
decoded value. Therefore, if you can't sure that input data is following the
T type, it would better to call one of below functions intead.
Form data decoder.
typia.http.formData()
is a function decodingFormData
instance, with automatic type casting to the expected type. When roperty type be defined asboolean
orBlob
type,typia.http.formData()
will cast the value to the expected type when decoding.By the way, as
FormData
is not enough to express complex data structures,typia.http.formData()
function has some limitations. If target typeT
is not following those restrictions, compilation errors would be occured.T
must be an object typeboolean
,bigint
,number
,string
,Blob
,File
or their array types are allowedAlso,
typia.http.formData()
function does not perform validation about the decoded value. Therefore, if you can't sure that input data is following theT
type, it would better to call one of below functions intead.