mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-14 10:02:16 +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
18 lines
517 B
TypeScript
18 lines
517 B
TypeScript
import { YTNode, type ObservedArray } from '../helpers.js';
|
|
import Parser, { type RawNode } from '../index.js';
|
|
import Text from './misc/Text.js';
|
|
|
|
export default class CardCollection extends YTNode {
|
|
static type = 'CardCollection';
|
|
|
|
cards: ObservedArray<YTNode>;
|
|
header: Text;
|
|
allow_teaser_dismiss: boolean;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.cards = Parser.parseArray(data.cards);
|
|
this.header = new Text(data.headerText);
|
|
this.allow_teaser_dismiss = data.allowTeaserDismiss;
|
|
}
|
|
} |