Files
YouTube.js/src/parser/classes/SegmentedLikeDislikeButton.ts
Daniel Wykerd b13bf6e992 refactor(Parser)!: general refactoring of parsers (#344)
* refactor: move common info into MediaInfo

* refactor: better inference on Memo

* refactor: improved typesafety in parser methods

* refactor: remove PlaylistAuthor in favor of Author

* refactor: cleanup live chat parsers

- Replace non standard author type with Author class
- Remove redundant code

* fix: new errors due to changes

* fix: pass actions to FormatUtils#toDash

* refactor!: merge NavigatableText and Text into single class
2023-03-15 18:25:12 -03:00

20 lines
658 B
TypeScript

import { YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
import Parser from '../index.js';
import Button from './Button.js';
import ToggleButton from './ToggleButton.js';
class SegmentedLikeDislikeButton extends YTNode {
static type = 'SegmentedLikeDislikeButton';
like_button: ToggleButton | Button | null;
dislike_button: ToggleButton | Button | null;
constructor (data: RawNode) {
super();
this.like_button = Parser.parseItem(data.likeButton, [ ToggleButton, Button ]);
this.dislike_button = Parser.parseItem(data.dislikeButton, [ ToggleButton, Button ]);
}
}
export default SegmentedLikeDislikeButton;