Files
YouTube.js/src/parser/classes/comments/CommentActionButtons.ts
Chinmay Kumar cfc1a183e0 refactor(parser): type YTNodes' data arg as RawNode (wip) (#339)
* replaced YTNode's data arg as RawNode

* updated documentation

* removed unused import

---- Note that there are still many nodes that need to be updated, hence the WIP status.
2023-03-07 02:02:07 -03:00

25 lines
804 B
TypeScript

import Parser from '../../index.js';
import type Button from '../Button.js';
import type ToggleButton from '../ToggleButton.js';
import type CreatorHeart from './CreatorHeart.js';
import { YTNode } from '../../helpers.js';
import type { RawNode } from '../../index.js';
class CommentActionButtons extends YTNode {
static type = 'CommentActionButtons';
like_button;
dislike_button;
reply_button;
creator_heart;
constructor(data: RawNode) {
super();
this.like_button = Parser.parseItem<ToggleButton>(data.likeButton);
this.dislike_button = Parser.parseItem<ToggleButton>(data.dislikeButton);
this.reply_button = Parser.parseItem<Button>(data.replyButton);
this.creator_heart = Parser.parseItem<CreatorHeart>(data.creatorHeart);
}
}
export default CommentActionButtons;