Object (SchemaDef)
The object type — structured key/value data described by a SchemaDef.
Declaring the shape (SchemaDef)
addr: { street: string, city: string } # inline SchemaDef
meta: {} # any object (no fixed shape)
meta: object # same as {}
home: $address # a referenced SchemaDefname: string, location: { x: int, y: int }
---
~ John, { 1, 2 } # ✓ location = { x: 1, y: 2 }
~ John, { 1, two } # ✗ invalid-type (y is not an int)TypeDef
Option
Type
Description
Nesting
Open and dynamic objects
Optional, nullable & defaults
Input
Result
Implementation status (beta)
See Also
Last updated
Was this helpful?
