---
lang: en
title: 'API docs: repository.type.coerce'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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 | <code>any</code> | The value to be coerced |
|  options | <code>Options</code> | Options for coercion |

<b>Returns:</b>

`T | null | undefined`

Coerced value of this type


