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

# Function: inferType()

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

Defined in: [src/parser/generator.ts:92](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L92)

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
