> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: VUnion<Type, T, IsOptional, FieldPaths>

> Not exported: an exported type refers to it.

[browser](/api/modules/browser).VUnion

Not exported: an exported type refers to it.

## Type parameters

| Name | Type |
| :- | :- |
| `Type` | `Type` |
| `T` | extends [`Validator`](/api/modules/browser#validator)\<`any`, `"required"`, `any`>\[] |
| `IsOptional` | extends [`OptionalProperty`](/api/modules/browser#optionalproperty) = `"required"` |
| `FieldPaths` | extends `string` = `T`\[`number`]\[`"fieldPaths"`] |

## Hierarchy

* `BaseValidator`\<`Type`, `IsOptional`, `FieldPaths`>

  ↳ **`VUnion`**

## Constructors

### constructor

• **new VUnion**\<`Type`, `T`, `IsOptional`, `FieldPaths`>(`«destructured»`)

#### Type parameters

| Name | Type |
| :- | :- |
| `Type` | `Type` |
| `T` | extends [`Validator`](/api/modules/browser#validator)\<`any`, `"required"`, `any`>\[] |
| `IsOptional` | extends [`OptionalProperty`](/api/modules/browser#optionalproperty) = `"required"` |
| `FieldPaths` | extends `string` = `T`\[`number`]\[`"fieldPaths"`] |

#### Parameters

| Name | Type |
| :- | :- |
| `«destructured»` | `Object` |
| › `isOptional` | `IsOptional` |
| › `members` | `T` |

#### Overrides

BaseValidator\&lt;Type, IsOptional, FieldPaths\&gt;.constructor

## Properties

### type

• `Readonly` **type**: `Type`

#### Inherited from

BaseValidator.type

***

### fieldPaths

• `Readonly` **fieldPaths**: `FieldPaths`

#### Inherited from

BaseValidator.fieldPaths

***

### isOptional

• `Readonly` **isOptional**: `IsOptional`

#### Inherited from

BaseValidator.isOptional

***

### isConvexValidator

• `Readonly` **isConvexValidator**: `true`

#### Inherited from

BaseValidator.isConvexValidator

***

### members

• `Readonly` **members**: `T`

***

### kind

• `Readonly` **kind**: `"union"`

## Accessors

### json

• `get` **json**(): [`ValidatorJSON`](/api/modules/browser#validatorjson)

#### Returns

[`ValidatorJSON`](/api/modules/browser#validatorjson)

#### Overrides

BaseValidator.json

## Methods

### optional

▸ **optional**(): [`VUnion`](/api/classes/browser.VUnion)\<`undefined` | `Type`, `T`, `"optional"`, `FieldPaths`>

#### Returns

[`VUnion`](/api/classes/browser.VUnion)\<`undefined` | `Type`, `T`, `"optional"`, `FieldPaths`>

#### Overrides

BaseValidator.optional

***

### asOptional

▸ **asOptional**(): [`VUnion`](/api/classes/browser.VUnion)\<`undefined` | `Type`, `T`, `"optional"`, `FieldPaths`>

#### Returns

[`VUnion`](/api/classes/browser.VUnion)\<`undefined` | `Type`, `T`, `"optional"`, `FieldPaths`>

#### Overrides

BaseValidator.asOptional


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.