Values 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: `DueWeights` crosses a boundary as JSON, where a map is an object and its keys are text; `DueAt` is built on `Instant`. next: Key the map by a type built on `Text` or `Uuid`, or send a list of objects instead (agent) rule: type.map_key_boundary help: https://jadpo.dev/docs/errors/type.map_key_boundarycheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/type.map_key_boundary.md.Built from Jadpo main at a707efb.