mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-30 09:55:18 +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:
22
src/parser/classes/ExpandableTab.ts
Normal file
22
src/parser/classes/ExpandableTab.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import Parser from '../index';
|
||||
import NavigationEndpoint from './NavigationEndpoint';
|
||||
import { YTNode } from '../helpers';
|
||||
|
||||
class ExpandableTab extends YTNode {
|
||||
static type = 'ExpandableTab';
|
||||
|
||||
title: string;
|
||||
endpoint: NavigationEndpoint;
|
||||
selected: boolean;
|
||||
content;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.title = data.title;
|
||||
this.endpoint = new NavigationEndpoint(data.endpoint);
|
||||
this.selected = data.selected; // If this.selected then we may have content else we do not
|
||||
this.content = data.content ? Parser.parse(data.content) : null;
|
||||
}
|
||||
}
|
||||
|
||||
export default ExpandableTab;
|
||||
Reference in New Issue
Block a user