toSchemaType
[ Function ]
Version 1.8
public static toSchemaType(
value: any,
schema: TcHmi.JsonSchema | null
): any | null;
Version 1.12
public static toSchemaType(
value: any,
schema: TcHmi.JsonSchema | null
options?: {
readonly convertDirection?: ValueConverter.ConvertDirection;
}
): any | null;
Converts any compatible value to a type defined by a schema object.
Parameter
Name | Type | Description |
---|---|---|
value | The value to convert. | |
schema | TcHmi.JsonSchema | The schema object. |
options [ optional ] Available from version 1.12
| { | Settings |
Return value
Type | Description |
---|---|
The value corresponding to the schema object or null in the event of an error. |
Available from 1.8 |