[youtubei.js](../../../README.md) / [Generator](../README.md) / inferType

# Function: inferType()

> **inferType**(`key`, `value`): [`InferenceType`](../type-aliases/InferenceType.md)

Infer the type of key given its value

## Parameters

• **key**: `string`

The key to infer the type of

• **value**: `unknown`

The value of the key

## Returns

[`InferenceType`](../type-aliases/InferenceType.md)

The inferred type

## Defined in

[src/parser/generator.ts:92](https://github.com/LuanRT/YouTube.js/blob/4729016fb98e7045ee4043857be7eef780c01e35/src/parser/generator.ts#L92)
