mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 00:56:23 +00:00
feat: migrate all playlist renderers to TypeScript
This commit is contained in:
20
src/parser/classes/PlaylistSidebar.ts
Normal file
20
src/parser/classes/PlaylistSidebar.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Parser from '../index';
|
||||
import { YTNode } from '../helpers';
|
||||
|
||||
class PlaylistSidebar extends YTNode {
|
||||
static type = 'PlaylistSidebar';
|
||||
|
||||
items;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.items = Parser.parse(data.items);
|
||||
}
|
||||
|
||||
// XXX: alias for consistency
|
||||
get contents() {
|
||||
return this.items;
|
||||
}
|
||||
}
|
||||
|
||||
export default PlaylistSidebar;
|
||||
Reference in New Issue
Block a user