UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

38 lines (24 loc) 957 B
--- lang: en title: 'API docs: repository.type.coerce' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository permalink: /doc/en/lb4/apidocs.repository.type.coerce.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [Type](./repository.type.md) &gt; [coerce](./repository.type.coerce.md) ## Type.coerce() method Coerce the value into this type <b>Signature:</b> ```typescript coerce(value: any, options?: Options): T | null | undefined; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | value | any | The value to be coerced | | options | [Options](./repository.options.md) | Options for coercion | <b>Returns:</b> T \| null \| undefined Coerced value of this type