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

# Function: generateTypescriptClass()

> **generateTypescriptClass**(`classname`, `key_info`): `string`

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

Generate a typescript class based on the key info

## Parameters

### classname

`string`

The name of the class

### key\_info

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

The key info, as returned by [introspect](introspect.md)

## Returns

`string`

Typescript class file
