mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 12:31:17 +00:00
* dev: finish top-level parsers TS migration
* dev: migrate menu renderers to TS
* chore: fix ts errors
* dev: finish ts migration 🎉
24 lines
460 B
TypeScript
24 lines
460 B
TypeScript
import Parser from '../index';
|
|
import { YTNode } from '../helpers';
|
|
|
|
class MerchandiseShelf extends YTNode {
|
|
static type = 'MerchandiseShelf';
|
|
|
|
title: string;
|
|
menu;
|
|
items;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.title = data.title;
|
|
this.menu = Parser.parse(data.actionButton);
|
|
this.items = Parser.parse(data.items);
|
|
}
|
|
|
|
// XXX: alias for consistency
|
|
get contents() {
|
|
return this.items;
|
|
}
|
|
}
|
|
|
|
export default MerchandiseShelf; |