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

# Function: generateTypescriptClass()

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

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

## Defined in

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