mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-23 23:09:28 +00:00
chore: v4.3.0 release
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
import Text from './misc/Text.ts';
|
||||
import NavigationEndpoint from './NavigationEndpoint.ts';
|
||||
import { YTNode } from '../helpers.ts';
|
||||
import type { RawNode } from '../index.ts';
|
||||
|
||||
class ToggleMenuServiceItem extends YTNode {
|
||||
export default class ToggleMenuServiceItem extends YTNode {
|
||||
static type = 'ToggleMenuServiceItem';
|
||||
|
||||
text: Text;
|
||||
toggled_text: Text;
|
||||
icon_type: string;
|
||||
toggled_icon_type: string;
|
||||
endpoint: NavigationEndpoint;
|
||||
default_endpoint: NavigationEndpoint;
|
||||
toggled_endpoint: NavigationEndpoint;
|
||||
|
||||
constructor(data: any) {
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.text = new Text(data.defaultText);
|
||||
this.toggled_text = new Text(data.toggledText);
|
||||
this.icon_type = data.defaultIcon.iconType;
|
||||
this.toggled_icon_type = data.toggledIcon.iconType;
|
||||
this.endpoint = new NavigationEndpoint(data.toggledServiceEndpoint);
|
||||
this.default_endpoint = new NavigationEndpoint(data.defaultServiceEndpoint);
|
||||
this.toggled_endpoint = new NavigationEndpoint(data.toggledServiceEndpoint);
|
||||
}
|
||||
}
|
||||
|
||||
export default ToggleMenuServiceItem;
|
||||
}
|
||||
Reference in New Issue
Block a user