# createVariant

> **createVariant**\<`T`\>(`variant`): [`CandidVariant`](../type-aliases/CandidVariant.md)\<`T`\>

Defined in: [utils/candid.ts:22](https://github.com/B3Pay/ic-reactor/blob/452866bcf5c5994de1f73416e6a3b2d18e4188fa/packages/core/src/utils/candid.ts#L22)

Creates a Candid variant from a record.

## Type Parameters

### T

`T` *extends* `Record`\<`string`, `any`\>

## Parameters

### variant

`T`

The record to convert into a variant

## Returns

[`CandidVariant`](../type-aliases/CandidVariant.md)\<`T`\>

An object representing the Candid variant