> ## 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: VFile<Type, IsOptional>

> Not exported: an exported type refers to it.

[server](/api/modules/server).VFile

Not exported: an exported type refers to it.

## Type parameters

| Name | Type |
| :- | :- |
| `Type` | [`FileRef`](/api/modules/values#fileref) |
| `IsOptional` | extends [`OptionalProperty`](/api/modules/values#optionalproperty) = `"required"` |

## Hierarchy

* [`VId`](/api/classes/values.VId)\<`Type`, `IsOptional`>

  ↳ **`VFile`**

## Constructors

### constructor

• **new VFile**\<`Type`, `IsOptional`>(`isOptional`)

#### Type parameters

| Name | Type |
| :- | :- |
| `Type` | [`FileRef`](/api/modules/values#fileref) |
| `IsOptional` | extends [`OptionalProperty`](/api/modules/values#optionalproperty) = `"required"` |

#### Parameters

| Name | Type |
| :- | :- |
| `isOptional` | `IsOptional` |

#### Overrides

[VId](/api/classes/values.VId).[constructor](/api/classes/values.VId#constructor)

## Properties

### fileReference

• `Readonly` **fileReference**: `true`

***

### type

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

Only for TypeScript, the TS type of the JS values validated
by this validator.

#### Inherited from

[VId](/api/classes/values.VId).[type](/api/classes/values.VId#type)

***

### fieldPaths

• `Readonly` **fieldPaths**: `never`

Only for TypeScript, if this an Object validator, then
this is the TS type of its property names.

#### Inherited from

[VId](/api/classes/values.VId).[fieldPaths](/api/classes/values.VId#fieldpaths)

***

### isOptional

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

Whether this is an optional Object property value validator.

#### Inherited from

[VId](/api/classes/values.VId).[isOptional](/api/classes/values.VId#isoptional)

***

### isConvexValidator

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

Always `"true"`.

#### Inherited from

[VId](/api/classes/values.VId).[isConvexValidator](/api/classes/values.VId#isconvexvalidator)

***

### tableName

• `Readonly` **tableName**: [`TableNameFromType`](/api/modules/values#tablenamefromtype)\<`Type`>

The name of the table that the validated IDs must belong to.

#### Inherited from

[VId](/api/classes/values.VId).[tableName](/api/classes/values.VId#tablename)

***

### kind

• `Readonly` **kind**: `"id"`

The kind of validator, `"id"`.

#### Inherited from

[VId](/api/classes/values.VId).[kind](/api/classes/values.VId#kind)

## Accessors

### json

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

#### Returns

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

#### Inherited from

VId.json

## Methods

### optional

▸ **optional**(): [`VFile`](/api/classes/server.VFile)\<`undefined` | `Type`, `"optional"`>

Allow this field to be validated as absent.

#### Returns

[`VFile`](/api/classes/server.VFile)\<`undefined` | `Type`, `"optional"`>

#### Overrides

[VId](/api/classes/values.VId).[optional](/api/classes/values.VId#optional)

***

### asOptional

▸ **asOptional**(): [`VFile`](/api/classes/server.VFile)\<`undefined` | `Type`, `"optional"`>

#### Returns

[`VFile`](/api/classes/server.VFile)\<`undefined` | `Type`, `"optional"`>

#### Overrides

VId.asOptional


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