mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-20 04:51:16 +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:
25
src/parser/classes/PlayerErrorMessage.ts
Normal file
25
src/parser/classes/PlayerErrorMessage.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import Parser from '../index';
|
||||
import Text from './misc/Text';
|
||||
import Thumbnail from './misc/Thumbnail';
|
||||
import { YTNode } from '../helpers';
|
||||
|
||||
class PlayerErrorMessage extends YTNode {
|
||||
static type = 'PlayerErrorMessage';
|
||||
|
||||
subreason: Text;
|
||||
reason: Text;
|
||||
proceed_button;
|
||||
thumbnails: Thumbnail[];
|
||||
icon_type: string;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.subreason = new Text(data.subreason);
|
||||
this.reason = new Text(data.reason);
|
||||
this.proceed_button = Parser.parse(data.proceedButton);
|
||||
this.thumbnails = Thumbnail.fromResponse(data.thumbnail);
|
||||
this.icon_type = data.icon.iconType;
|
||||
}
|
||||
}
|
||||
|
||||
export default PlayerErrorMessage;
|
||||
Reference in New Issue
Block a user