Skip to main content
Version: Current

dateReviver

@rotorsoft/act-root


@rotorsoft/act-root / act/src / dateReviver

Function: dateReviver()

dateReviver(_key, value): unknown

Defined in: libs/act/src/utils.ts:141

Revive ISO-8601-shaped strings into Dates during JSON.parse.

The framework no longer uses this. Dates are resolved from the declared z.date() paths at build time and converted on read, so a field declared z.string() keeps its string even when the value looks like a timestamp (#1556). Adapters return what they stored; typing is the orchestrator's job.

Kept exported for host applications that parse Act JSON themselves and want the old shape-based behaviour. New code should let the schema decide.

Parametersโ€‹

_keyโ€‹

string

valueโ€‹

unknown

Returnsโ€‹

unknown