Interface: Extension
Properties
| Property | Type | Description |
|---|---|---|
base? | Schema<any> | - |
cast? | Record<string, { from: any; to: any; }> | undocumented options |
coerce? | | CoerceFunction | CoerceObject | - |
flags? | Record<string, ExtensionFlag> | - |
manifest? | { build?: any; } | - |
manifest.build? | any | - |
messages? | string | LanguageMessages | - |
modifiers? | Record<string, (rule: any, enabled?: boolean) => any> | - |
overrides? | Record<string, (value: any) => Schema> | - |
properties? | Record<string, any> | - |
rules? | Record<string, ExtensionRule & ThisType<SchemaInternals>> | - |
terms? | Record<string, ExtensionTerm> | - |
type | string | RegExp | - |
Methods
args()?
ts
optional args(...args: SchemaLike<any>[]): Schema;Parameters
| Parameter | Type |
|---|---|
...args | SchemaLike<any>[] |
Returns
Schema
prepare()?
ts
optional prepare(value: any, helpers: CustomHelpers): any;Parameters
| Parameter | Type |
|---|---|
value | any |
helpers | CustomHelpers |
Returns
any
rebuild()?
ts
optional rebuild(schema: ExtensionBoundSchema): void;Parameters
| Parameter | Type |
|---|---|
schema | ExtensionBoundSchema |
Returns
void
validate()?
ts
optional validate(value: any, helpers: CustomHelpers): any;Parameters
| Parameter | Type |
|---|---|
value | any |
helpers | CustomHelpers |
Returns
any