Type system and value coercion
Defines the canonical value types (string, int, decimal, bool, date, datetime with zone, enum, uuid) and coercion rules from editor input. Decimals are carried as strings to avoid floating-point loss, and datetimes require an explicit offset.
Planned. This page shows the specification from issue #182. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A transactions grid with a decimal amount, a datetime with offset, and an enum status.
Expected behavior
Typing '1,000.50' with a US locale coerces to decimal '1000.50'. A datetime entered locally is stored with an explicit offset. Strict mode rejects implicit conversions with TYPE_MISMATCH.
Planned API surface
fieldTypedecimaldatetimeTzenumValuescoerceValue()TYPE_MISMATCHAcceptance criteria
- Decimals serialize as strings and round-trip without precision loss (pending)
- Datetimes without an offset are rejected in the AST (pending)
- Enum values must belong to the declared enumValues (pending)
- Coercion is locale-aware for input but the AST is locale-neutral (pending)