YouTube.js
Guide
Discord
❤️ Sponsor
GitHub
Guide
Discord
❤️ Sponsor
GitHub

youtubei.js / Generator / toTypeDeclaration

Function: toTypeDeclaration()

toTypeDeclaration(inference_type, indentation?): string

Defined in: src/parser/generator.ts:520

For a given inference type, get the typescript type declaration

Parameters

inference_type

InferenceType

The inference type to get the declaration for

indentation?

number = 0

The indentation level (used for objects)

Returns

string

Typescript type declaration

Edit this page
Last Updated: 5/13/26, 3:20 AM