mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-02 13:07:28 +00:00
chore: v5.0.0 release
This commit is contained in:
@@ -1,23 +1,24 @@
|
||||
import Parser from '../index.ts';
|
||||
import Text from './misc/Text.ts';
|
||||
import { YTNode, type ObservedArray } from '../helpers.ts';
|
||||
import Parser, { type RawNode } from '../index.ts';
|
||||
import NavigationEndpoint from './NavigationEndpoint.ts';
|
||||
import { YTNode } from '../helpers.ts';
|
||||
import Text from './misc/Text.ts';
|
||||
|
||||
class VerticalWatchCardList extends YTNode {
|
||||
export default class VerticalWatchCardList extends YTNode {
|
||||
static type = 'VerticalWatchCardList';
|
||||
|
||||
items;
|
||||
contents;
|
||||
items: ObservedArray<YTNode>;
|
||||
view_all_text: Text;
|
||||
view_all_endpoint: NavigationEndpoint;
|
||||
|
||||
constructor(data: any) {
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.items = Parser.parseArray(data.items);
|
||||
this.contents = this.items; // XXX: alias for consistency
|
||||
this.view_all_text = new Text(data.viewAllText);
|
||||
this.view_all_endpoint = new NavigationEndpoint(data.viewAllEndpoint);
|
||||
}
|
||||
}
|
||||
|
||||
export default VerticalWatchCardList;
|
||||
// XXX: Alias for consistency.
|
||||
get contents() {
|
||||
return this.items;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user