> ## 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: VObject<Type, Fields, IsOptional, FieldPaths>

> Not exported: an exported type refers to it.

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

Not exported: an exported type refers to it.

## Type parameters

| Name | Type |
| :- | :- |
| `Type` | `Type` |
| `Fields` | extends `Record`\<`string`, [`GenericValidator`](/api/modules/browser#genericvalidator)> |
| `IsOptional` | extends [`OptionalProperty`](/api/modules/browser#optionalproperty) = `"required"` |
| `FieldPaths` | extends `string` = \{ \[Property in keyof Fields]: JoinFieldPaths\<Property & string, Fields\[Property]\["fieldPaths"]> \| Property }\[keyof `Fields`] & `string` |

## Hierarchy

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

  ↳ **`VObject`**

## Constructors

### constructor

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

#### Type parameters

| Name | Type |
| :- | :- |
| `Type` | `Type` |
| `Fields` | extends `Record`\<`string`, [`GenericValidator`](/api/modules/browser#genericvalidator)> |
| `IsOptional` | extends [`OptionalProperty`](/api/modules/browser#optionalproperty) = `"required"` |
| `FieldPaths` | extends `string` = \{ \[Property in string \| number \| symbol]: Property \| \`$\{Property & string}.$\{Fields\[Property]\["fieldPaths"]}\` }\[keyof `Fields`] & `string` |

#### Parameters

| Name | Type |
| :- | :- |
| `«destructured»` | `Object` |
| › `isOptional` | `IsOptional` |
| › `fields` | `Fields` |
| › `geometry?` | [`ValidatorGeometryJSON`](/api/modules/browser#validatorgeometryjson) |

#### 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

***

### fields

• `Readonly` **fields**: `Fields`

***

### kind

• `Readonly` **kind**: `"object"`

***

### geometry

• `Optional` `Readonly` **geometry**: [`ValidatorGeometryJSON`](/api/modules/browser#validatorgeometryjson)

## Accessors

### json

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

#### Returns

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

#### Overrides

BaseValidator.json

## Methods

### optional

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

#### Returns

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

#### Overrides

BaseValidator.optional

***

### asOptional

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

#### Returns

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

#### Overrides

BaseValidator.asOptional

***

### omit

▸ **omit**\<`K`>(`...fields`): [`VObject`](/api/classes/browser.VObject)\<[`Expand`](/api/modules/browser#expand)\<`Omit`\<`Type`, `K`>>, [`Expand`](/api/modules/browser#expand)\<`Omit`\<`Fields`, `K`>>, `IsOptional`, \{ \[Property in string | number | symbol]: Property | \`$\{Property & string}.$\{Expand\<Omit\<Fields, K>>\[Property]\["fieldPaths"]}\` }\[keyof [`Expand`](/api/modules/browser#expand)\<`Omit`\<`Fields`, `K`>>] & `string`>

#### Type parameters

| Name | Type |
| :- | :- |
| `K` | extends `string` |

#### Parameters

| Name | Type |
| :- | :- |
| `...fields` | `K`\[] |

#### Returns

[`VObject`](/api/classes/browser.VObject)\<[`Expand`](/api/modules/browser#expand)\<`Omit`\<`Type`, `K`>>, [`Expand`](/api/modules/browser#expand)\<`Omit`\<`Fields`, `K`>>, `IsOptional`, \{ \[Property in string | number | symbol]: Property | \`$\{Property & string}.$\{Expand\<Omit\<Fields, K>>\[Property]\["fieldPaths"]}\` }\[keyof [`Expand`](/api/modules/browser#expand)\<`Omit`\<`Fields`, `K`>>] & `string`>

***

### pick

▸ **pick**\<`K`>(`...fields`): [`VObject`](/api/classes/browser.VObject)\<[`Expand`](/api/modules/browser#expand)\<`Pick`\<`Type`, `Extract`\<keyof `Type`, `K`>>>, [`Expand`](/api/modules/browser#expand)\<`Pick`\<`Fields`, `K`>>, `IsOptional`, \{ \[Property in string | number | symbol]: Property | \`$\{Property & string}.$\{Expand\<Pick\<Fields, K>>\[Property]\["fieldPaths"]}\` }\[keyof [`Expand`](/api/modules/browser#expand)\<`Pick`\<`Fields`, `K`>>] & `string`>

#### Type parameters

| Name | Type |
| :- | :- |
| `K` | extends `string` |

#### Parameters

| Name | Type |
| :- | :- |
| `...fields` | `K`\[] |

#### Returns

[`VObject`](/api/classes/browser.VObject)\<[`Expand`](/api/modules/browser#expand)\<`Pick`\<`Type`, `Extract`\<keyof `Type`, `K`>>>, [`Expand`](/api/modules/browser#expand)\<`Pick`\<`Fields`, `K`>>, `IsOptional`, \{ \[Property in string | number | symbol]: Property | \`$\{Property & string}.$\{Expand\<Pick\<Fields, K>>\[Property]\["fieldPaths"]}\` }\[keyof [`Expand`](/api/modules/browser#expand)\<`Pick`\<`Fields`, `K`>>] & `string`>

***

### partial

▸ **partial**(): [`VObject`](/api/classes/browser.VObject)\<\{ \[K in string | number | symbol]?: Type\[K] }, \{ \[K in string | number | symbol]: VOptional\<Fields\[K]> }, `IsOptional`, \{ \[Property in string | number | symbol]: Property | \`$\{Property & string}.$\{\{ \[K in string | number | symbol]: VOptional\<Fields\[K]> }\[Property]\["fieldPaths"]}\` }\[keyof `Fields`] & `string`>

#### Returns

[`VObject`](/api/classes/browser.VObject)\<\{ \[K in string | number | symbol]?: Type\[K] }, \{ \[K in string | number | symbol]: VOptional\<Fields\[K]> }, `IsOptional`, \{ \[Property in string | number | symbol]: Property | \`$\{Property & string}.$\{\{ \[K in string | number | symbol]: VOptional\<Fields\[K]> }\[Property]\["fieldPaths"]}\` }\[keyof `Fields`] & `string`>

***

### extend

▸ **extend**\<`NewFields`>(`fields`): [`VObject`](/api/classes/browser.VObject)\<[`Expand`](/api/modules/browser#expand)\<`Type` & [`ObjectType`](/api/modules/browser#objecttype)\<`NewFields`>>, [`Expand`](/api/modules/browser#expand)\<`Fields` & `NewFields`>, `IsOptional`, \{ \[Property in string | number | symbol]: Property | \`$\{Property & string}.$\{Expand\<Fields & NewFields>\[Property]\["fieldPaths"]}\` }\[keyof [`Expand`](/api/modules/browser#expand)\<`Fields` & `NewFields`>] & `string`>

#### Type parameters

| Name | Type |
| :- | :- |
| `NewFields` | extends `Record`\<`string`, [`GenericValidator`](/api/modules/browser#genericvalidator)> |

#### Parameters

| Name | Type |
| :- | :- |
| `fields` | `NewFields` |

#### Returns

[`VObject`](/api/classes/browser.VObject)\<[`Expand`](/api/modules/browser#expand)\<`Type` & [`ObjectType`](/api/modules/browser#objecttype)\<`NewFields`>>, [`Expand`](/api/modules/browser#expand)\<`Fields` & `NewFields`>, `IsOptional`, \{ \[Property in string | number | symbol]: Property | \`$\{Property & string}.$\{Expand\<Fields & NewFields>\[Property]\["fieldPaths"]}\` }\[keyof [`Expand`](/api/modules/browser#expand)\<`Fields` & `NewFields`>] & `string`>


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