@loopback/docs
Version:
Documentation for LoopBack 4
38 lines (26 loc) • 1.19 kB
Markdown
lang: en
title: 'API docs: repository.type'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.type.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [Type](./repository.type.md)
## Type interface
<b>Signature:</b>
```typescript
export interface Type<T>
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [name](./repository.type.name.md) | <code>string</code> | Name of the type |
## Methods
| Method | Description |
| --- | --- |
| [coerce(value, options)](./repository.type.coerce.md) | Coerce the value into this type |
| [defaultValue()](./repository.type.defaultvalue.md) | Generate the default value for this type |
| [isCoercible(value, options)](./repository.type.iscoercible.md) | Check if the given value can be coerced into this type |
| [isInstance(value)](./repository.type.isinstance.md) | Test if the given value is an instance of this type |
| [serialize(value, options)](./repository.type.serialize.md) | Serialize a value into json |