mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 12:31:17 +00:00
22 lines
530 B
TypeScript
22 lines
530 B
TypeScript
import { YTNode, type ObservedArray } from '../helpers.ts';
|
|
import Parser, { type RawNode } from '../index.ts';
|
|
|
|
export default class MerchandiseShelf extends YTNode {
|
|
static type = 'MerchandiseShelf';
|
|
|
|
title: string;
|
|
menu: YTNode;
|
|
items: ObservedArray<YTNode>;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.title = data.title;
|
|
this.menu = Parser.parseItem(data.actionButton);
|
|
this.items = Parser.parseArray(data.items);
|
|
}
|
|
|
|
// XXX: Alias for consistency.
|
|
get contents() {
|
|
return this.items;
|
|
}
|
|
} |