toTypeEx

[ Function ]

public static toTypeEx<T>(
    value: any,
    typeName: string,
    options?: {
        readonly convertDirection?: ValueConverter.ConvertDirection;
    }
): ValueConverter.IResultObject<T>;

Converts any compatible value to a type defined by a type schema.

Parameter

Name

Type

Description

value

any

The value to convert.

typeName

string

The name of the type schema.

options [ optional ]

{
    readonly convertDirection?: ValueConverter.ConvertDirection;
}

Settings

Return value

Type

Description

ValueConverter.IResultObject<T>

Result object

toTypeEx 1:

Available from version 1.12