@loopback/docs
Version:
Documentation for LoopBack 4
47 lines (32 loc) • 1.43 kB
Markdown
lang: en
title: 'API docs: repository.uniontype'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.uniontype.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [UnionType](./repository.uniontype.md)
## UnionType class
Union type, such as string \| number
<b>Signature:</b>
```typescript
export declare class UnionType implements Type<any>
```
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(itemTypes)](./repository.uniontype.(constructor).md) | | Constructs a new instance of the <code>UnionType</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [itemTypes](./repository.uniontype.itemtypes.md) | | <code>Type<any>[]</code> | |
| [name](./repository.uniontype.name.md) | | <code></code> | |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [coerce(value)](./repository.uniontype.coerce.md) | | |
| [defaultValue()](./repository.uniontype.defaultvalue.md) | | |
| [isCoercible(value)](./repository.uniontype.iscoercible.md) | | |
| [isInstance(value)](./repository.uniontype.isinstance.md) | | |
| [serialize(value)](./repository.uniontype.serialize.md) | | |