mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-23 23:09:28 +00:00
refactor!: rewrite MusicNavigationButton to TypeScript
Plus fix “endpoint” prop, it is `clickCommand` and not `navigationEndpoint`.
This commit is contained in:
@@ -5,10 +5,13 @@ import { YTNode } from '../helpers';
|
||||
class MusicNavigationButton extends YTNode {
|
||||
static type = 'MusicNavigationButton';
|
||||
|
||||
constructor(data) {
|
||||
button_text: string;
|
||||
endpoint: NavigationEndpoint;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.button_text = new Text(data.buttonText).toString();
|
||||
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
||||
this.endpoint = new NavigationEndpoint(data.clickCommand);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user