mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-25 07:42:11 +00:00
feat(MultiPageMenuNotificationSection): Add notification_section_title
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
import { Parser } from '../../index.js';
|
||||
import { type ObservedArray, YTNode } from '../../helpers.js';
|
||||
import type { RawNode } from '../../index.js';
|
||||
import { Parser, type RawNode } from '../../index.js';
|
||||
import ContinuationItem from '../ContinuationItem.js';
|
||||
import Message from '../Message.js';
|
||||
import Notification from '../Notification.js';
|
||||
import Text from '../misc/Text.js';
|
||||
|
||||
export default class MultiPageMenuNotificationSection extends YTNode {
|
||||
static type = 'MultiPageMenuNotificationSection';
|
||||
|
||||
public items: ObservedArray<YTNode>;
|
||||
public notification_section_title?: Text;
|
||||
public items: ObservedArray<Notification | Message | ContinuationItem>;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.items = Parser.parseArray(data.items);
|
||||
|
||||
if ('notificationSectionTitle' in data) {
|
||||
this.notification_section_title = new Text(data.notificationSectionTitle);
|
||||
}
|
||||
|
||||
this.items = Parser.parseArray(data.items, [ Notification, Message, ContinuationItem ]);
|
||||
}
|
||||
|
||||
// XXX: Alias for consistency.
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Parser, type RawNode } from '../../index.js';
|
||||
export default class MultiPageMenuSection extends YTNode {
|
||||
static type = 'MultiPageMenuSection';
|
||||
|
||||
public items: ObservedArray<YTNode> | null;
|
||||
public items: ObservedArray<YTNode>;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user