mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 09:06:51 +00:00
refactor: clean up parser and tests (#387)
* tests: improve coverage * refactor: clean up nodes * chore: lint * feat(parser): ignore `BrandVideoShelf` Seems to be used for ads. * feat(parser): ignore `BrandVideoSingleton` too
This commit is contained in:
@@ -2,16 +2,17 @@ import Parser from '../../index.js';
|
||||
import Button from '../Button.js';
|
||||
import ToggleButton from '../ToggleButton.js';
|
||||
import CreatorHeart from './CreatorHeart.js';
|
||||
|
||||
import { YTNode } from '../../helpers.js';
|
||||
import type { RawNode } from '../../index.js';
|
||||
|
||||
class CommentActionButtons extends YTNode {
|
||||
export default class CommentActionButtons extends YTNode {
|
||||
static type = 'CommentActionButtons';
|
||||
|
||||
like_button;
|
||||
dislike_button;
|
||||
reply_button;
|
||||
creator_heart;
|
||||
like_button: ToggleButton | null;
|
||||
dislike_button: ToggleButton | null;
|
||||
reply_button: Button | null;
|
||||
creator_heart: CreatorHeart | null;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
@@ -20,6 +21,4 @@ class CommentActionButtons extends YTNode {
|
||||
this.reply_button = Parser.parseItem(data.replyButton, Button);
|
||||
this.creator_heart = Parser.parseItem(data.creatorHeart, CreatorHeart);
|
||||
}
|
||||
}
|
||||
|
||||
export default CommentActionButtons;
|
||||
}
|
||||
Reference in New Issue
Block a user