Files
YouTube.js/src/parser/classes/ChannelSwitcherHeader.ts
Patrick Kan a7bb981731 refactor: Cookie-based session fixes and minor additions (#821)
* (fix) `on_behalf_of_user` arg not applied

* (feat) `AccountManager#getInfo()`: Add option to fetch full accounts list
2024-11-28 17:44:30 -03:00

20 lines
512 B
TypeScript

import { YTNode } from '../helpers.js';
import { Parser, type RawNode } from '../index.js';
import { Text } from '../misc.js';
import Button from './Button.js';
export default class ChannelSwitcherHeader extends YTNode {
static type = 'ChannelSwitcherHeader';
title: string;
button?: Button | null;
constructor(data: RawNode) {
super();
this.title = new Text(data.title).toString();
if (Reflect.has(data, 'button')) {
this.button = Parser.parseItem(data.button, Button);
}
}
}