ErrorsValues and types · rule
type.map_key_boundary
Map key at a boundary isn't text.
Area 2, Values and types; not declinable; the next step is usually the agent's.
A map in an Input or an Output is a JSON object, whose keys are text, so
its key type is built on Text or Uuid (question 5):
type DueAt = Instant {}type Weight = Int { min: 0}type DueWeights = Output { weights: Map<DueAt, Weight>}
error DueWeights holds a map keyed by DueAt
--> main.jadpo:8:14
|8 | weights: Map<DueAt, Weight> | ^^^^^^^^^^^^^^^^^^ keys are `DueAt`
- reason
DueWeightscrosses a boundary as JSON, where a map is an object and its keys are text;DueAtis built onInstant.- next
- Key the map by a type built on
TextorUuid, or send a list of objects instead (agent) - rule
- type.
map_ key_ boundary - help
- https://jadpo.
dev/docs/errors/type. map_ key_ boundary
Markdown for agents: /docs/errors/type.map_key_boundary.md.Built from Jadpo main at aee2e8f.