Added more format tags like below.
export interface TypeTagFormat {
// SPECIAL CHARACTERS
byte: string & tags.Format<"byte">;
password: string & tags.Format<"password">;
regex: string & tags.Format<"regex">;
uuid: string & tags.Format<"uuid">;
// ADDRESSES
email: string & tags.Format<"email">;
hostname: string & tags.Format<"hostname">;
idnEmail: string & tags.Format<"idn-email">;
idnHostname: string & tags.Format<"idn-hostname">;
iri: string & tags.Format<"iri">;
iriReference: string & tags.Format<"iri-reference">;
ipv4: string & tags.Format<"ipv4">;
ipv6: string & tags.Format<"ipv6">;
uri: string & tags.Format<"uri">;
uriReference: string & tags.Format<"uri-reference">;
uriTemplate: string & tags.Format<"uri-template">;
url: string & tags.Format<"url">;
// TIMESTAMPS
datetime: string & tags.Format<"date-time">;
date: string & tags.Format<"date">;
time: string & tags.Format<"time">;
duration: string & tags.Format<"duration">;
// POINTERS
jsonPointer: string & tags.Format<"json-pointer">;
relativeJsonPointer: string & tags.Format<"relative-json-pointer">;
}
Also, new function typia.http.assertFormData<T>(input: FormData): Resolved<T>
function added.
With the function, you can parse the FormData
instance even including the Blob
or File
property.
import typia, { tags } from "typia";
interface ObjectHttpFormData {
id: string & tags.Format<"uuid">;
strings: string[];
number: number;
integers: Array<number & tags.Type<"int32">>;
blob: Blob;
blobs: Blob[];
file: File;
files: File[];
}
const data: ObjectHttpFormData = typia.http.assertFormData<ObjectHttpFormData>();
What's Changed
- Enhance intro page: shows
random()
function. by @samchon in #939 - Support much more format tags. by @samchon in #938
- More format tags and fix bug of comment format tags. by @samchon in #942
- Fix samchon/nestia#777 - JSON schema for
Date | null
type. by @samchon in #945 - Close #940 -
typia.http.formData<T>()
function. by @samchon in #946
Full Changelog: v5.3.12...v5.4.3