@versionzero/schema / types / ISchemaOptionsCommon
Interface: ISchemaOptionsCommon
Defined in: src/types.js:37
Properties
| Property | Type | Description |
|---|---|---|
type? | SchemaFundamentalType | should only be set on the core types supported by the schema |
compileHook? | (arg0, arg1) => void | a function called during schema compilation |
allowEmpty? | boolean | whether an array type or string type can be empty |
allowUndefined? | boolean | whether undefined values can be passed through this schema |
allowErrors? | boolean | whether to throw when a processor returns an Error, or treat it as a legal value |
strict? | boolean | whether to do strict typechecking (defaults to true; must be explicitly false to be "lax") |
reference? | boolean | disallow direct assignment; value will be inherited from a parent |
required? | boolean | flag indicating whether this field is required |
literal? | boolean | flag indicating that this field always returns the option value |
implicit? | boolean | flag indicating that this field exists implicitly in the post-transform value |
dynamic? | boolean | true/undefined means treat functional values as dynamic lookups; false means treat functions as values |
context? | string | triggers value to be copied to the context field with this name |
default? | any | default value |
values? | any[] | list of legal input values for this field |
selector? | boolean | true if this schema acts as a selector |
selection? | string | boolean | this schema activates if the selector matches the value, or matches this prop name if true |