mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-03 09:35:05 +00:00
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:
28
src/parser/classes/MusicDescriptionShelf.ts
Normal file
28
src/parser/classes/MusicDescriptionShelf.ts
Normal 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;
|
||||
Reference in New Issue
Block a user