TypeDef
TypeDef — the fixed option contract that every MemberDef of a type is validated against.
Positional and keyed options
~ $schema: {
a: { number, 20 }, # type + default
b: { int16, 1, [1, 2, 3] }, # type + default + choices
c: { number, 50, min: 10, max: 99 }, # default + keyed options
d: { number, 10, [5, 10, 15], min: 5 } # default + choices + keyed option
}
---
~ # all omitted → defaults a 20, b 1, c 50, d 10
~ 25, 3, 60, 15 # a 25, b 3, c 60, d 15Validation against the TypeDef
TypeDefs are fixed
See Also
Last updated
Was this helpful?
