mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 19:12:24 +00:00
* tests: improve coverage * refactor: clean up nodes * chore: lint * feat(parser): ignore `BrandVideoShelf` Seems to be used for ads. * feat(parser): ignore `BrandVideoSingleton` too
21 lines
723 B
TypeScript
21 lines
723 B
TypeScript
import { YTNode, type ObservedArray } from '../helpers.js';
|
|
import Parser, { type RawNode } from '../index.js';
|
|
import Button from './Button.js';
|
|
import ChipCloudChip from './ChipCloudChip.js';
|
|
|
|
export default class ChipCloud extends YTNode {
|
|
static type = 'ChipCloud';
|
|
|
|
chips: ObservedArray<ChipCloudChip>;
|
|
next_button: Button | null;
|
|
previous_button: Button | null;
|
|
horizontal_scrollable: boolean;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.chips = Parser.parseArray(data.chips, ChipCloudChip);
|
|
this.next_button = Parser.parseItem(data.nextButton, Button);
|
|
this.previous_button = Parser.parseItem(data.previousButton, Button);
|
|
this.horizontal_scrollable = data.horizontalScrollable;
|
|
}
|
|
} |