mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
refactor: migrate parsers to TS (#133)
* dev: finish top-level parsers TS migration
* dev: migrate menu renderers to TS
* chore: fix ts errors
* dev: finish ts migration 🎉
This commit is contained in:
19
src/parser/classes/livechat/UpdateToggleButtonTextAction.ts
Normal file
19
src/parser/classes/livechat/UpdateToggleButtonTextAction.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import Text from '../misc/Text';
|
||||
import { YTNode } from '../../helpers';
|
||||
|
||||
class UpdateToggleButtonTextAction extends YTNode {
|
||||
static type = 'UpdateToggleButtonTextAction';
|
||||
|
||||
default_text: string;
|
||||
toggled_text: string;
|
||||
button_id: string;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.default_text = new Text(data.defaultText).toString();
|
||||
this.toggled_text = new Text(data.toggledText).toString();
|
||||
this.button_id = data.buttonId;
|
||||
}
|
||||
}
|
||||
|
||||
export default UpdateToggleButtonTextAction;
|
||||
Reference in New Issue
Block a user