Any
The any type — accepts any value, optionally constrained by anyOf or choices.
a, b: any, c: { type: any }
---
~ hello, 42, T # ✓ — anything goesDeclaring alternatives (anyOf)
id: { any, anyOf: [string, int] }
---
~ 42 # ✓ matches int
~ abc # ✓ matches stringflag: { any, anyOf: [bool, int] }
---
~ hello # ✗ matches neithervalue: { any, anyOf: [{ int, multipleOf: 5 }, { int, multipleOf: 3 }] }
---
~ 10 # ✓ multiple of 5
~ 9 # ✓ multiple of 3TypeDef
Option
Type
Description
choices
Optional, nullable & defaults
Implementation status (beta)
See Also
Last updated
Was this helpful?
