mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-15 02:22:11 +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
22 lines
564 B
TypeScript
22 lines
564 B
TypeScript
import { YTNode, type ObservedArray } from '../helpers.js';
|
|
import Parser, { type RawNode } from '../index.js';
|
|
import CompactLink from './CompactLink.js';
|
|
import Text from './misc/Text.js';
|
|
|
|
export default class SettingsSidebar extends YTNode {
|
|
static type = 'SettingsSidebar';
|
|
|
|
title: Text;
|
|
items: ObservedArray<CompactLink>;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.title = new Text(data.title);
|
|
this.items = Parser.parseArray(data.items, CompactLink);
|
|
}
|
|
|
|
// XXX: Alias for consistency.
|
|
get contents() {
|
|
return this.items;
|
|
}
|
|
} |