mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-13 01:22:11 +00:00
fix(FlexibleActionsView): Update ActionRow actions type (#1129)
This commit is contained in:
@@ -2,9 +2,10 @@ import { type ObservedArray, YTNode } from '../helpers.js';
|
||||
import { Parser, type RawNode } from '../index.js';
|
||||
import ButtonView from './ButtonView.js';
|
||||
import ToggleButtonView from './ToggleButtonView.js';
|
||||
import SubscribeButtonView from './SubscribeButtonView.js';
|
||||
|
||||
export type ActionRow = {
|
||||
actions: ObservedArray<ButtonView | ToggleButtonView>;
|
||||
actions: ObservedArray<ButtonView | ToggleButtonView | SubscribeButtonView>;
|
||||
};
|
||||
|
||||
export default class FlexibleActionsView extends YTNode {
|
||||
@@ -16,8 +17,8 @@ export default class FlexibleActionsView extends YTNode {
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.actions_rows = data.actionsRows.map((row: RawNode) => ({
|
||||
actions: Parser.parseArray(row.actions, [ ButtonView, ToggleButtonView ])
|
||||
actions: Parser.parseArray(row.actions, [ ButtonView, ToggleButtonView, SubscribeButtonView ])
|
||||
}));
|
||||
this.style = data.style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user