mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 19:12:24 +00:00
* ft: add end_icons to MusicCarouselShelfBasicHeader * fix: `music#getPlaylist()` breaking playlist_id
25 lines
531 B
TypeScript
25 lines
531 B
TypeScript
import Text from './misc/Text';
|
|
import { YTNode } from '../helpers';
|
|
import NavigationEndpoint from './NavigationEndpoint';
|
|
|
|
class IconLink extends YTNode {
|
|
static type = 'IconLink';
|
|
|
|
icon_type: string;
|
|
tooltip?: string;
|
|
endpoint: NavigationEndpoint;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
|
|
this.icon_type = data.icon?.iconType;
|
|
|
|
if (data.tooltip) {
|
|
this.tooltip = new Text(data.tooltip).toString();
|
|
}
|
|
|
|
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
|
}
|
|
}
|
|
|
|
export default IconLink; |