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

# Function: toTypeDeclaration()

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

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

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
