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

# Function: toTypeDeclaration()

> **toTypeDeclaration**(`inference_type`, `indentation`): `string`

For a given inference type, get the typescript type declaration

## Parameters

• **inference\_type**: [`InferenceType`](../type-aliases/InferenceType.md)

The inference type to get the declaration for

• **indentation**: `number` = `0`

The indentation level (used for objects)

## Returns

`string`

Typescript type declaration

## Defined in

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