Page Contents

Home > @loopback/repository > Type > coerce

Type.coerce() method

Coerce the value into this type

Signature:

coerce(value: any, options?: Options): T | null | undefined;

Parameters

Parameter Type Description
value any The value to be coerced
options Options Options for coercion

Returns:

T | null | undefined

Coerced value of this type