Skip to main content

Function: dateTsType()

function dateTsType(
scalar,
format,
dateType
): string;

Defined in: packages/ir/src/helpers.ts:497

The TS type of a date / datetime value for a dateType: Date, an ISO 8601 string, or the Temporal.* class from temporalClass. format is the field's constraints.format (what tells a time of day from a timestamp).

Parameters​

ParameterType
scalar"date" | "datetime"
format| "date" | "datetime" | "uuid" | "email" | "url" | "cuid" | "cuid2" | "ulid" | "time" | "duration" | "ipv4" | "ipv6" | undefined
dateType"string" | "date" | "temporal"

Returns​

string