Built-in branded-number custom type. A DateTime crosses the wire as epoch
milliseconds. The emitted TypeScript brand is EpochMillis
(number & { readonly __brand: "EpochMillis" }). It stops callers passing a
bare number where an instant is expected.
Use it per field as RpcElixir.UnixMillis.t(). Or map every DateTime in a
router with wire_aliases, see Custom types.
Summary
Types
@type t() :: DateTime.t()
Functions
Deserializes integer epoch milliseconds to {:ok, DateTime.t()} | {:error, atom}.
Serializes a DateTime to integer epoch milliseconds.
TypeScript brand name emitted for this type.
Wire format: a JSON integer (epoch milliseconds).