refactor: migrate parsers to TS (#133)

* dev: finish top-level parsers TS migration

* dev: migrate menu renderers to TS

* chore: fix ts errors

* dev: finish ts migration 🎉
This commit is contained in:
LuanRT
2022-08-20 03:18:17 -03:00
committed by GitHub
parent b101a39d30
commit 34281e2445
206 changed files with 1747 additions and 608 deletions

View File

@@ -0,0 +1,28 @@
import Text from './misc/Text';
import { YTNode } from '../helpers';
class MusicDescriptionShelf extends YTNode {
static type = 'MusicDescriptionShelf';
description: Text;
max_collapsed_lines?: string;
max_expanded_lines?: string;
footer: Text;
constructor(data: any) {
super();
this.description = new Text(data.description);
if (this.max_collapsed_lines) {
this.max_collapsed_lines = data.maxCollapsedLines;
}
if (this.max_expanded_lines) {
this.max_expanded_lines = data.maxExpandedLines;
}
this.footer = new Text(data.footer);
}
}
export default MusicDescriptionShelf;