mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 12:31:17 +00:00
* dev: finish top-level parsers TS migration
* dev: migrate menu renderers to TS
* chore: fix ts errors
* dev: finish ts migration 🎉
31 lines
605 B
TypeScript
31 lines
605 B
TypeScript
import { YTNode } from '../../helpers';
|
|
|
|
class AuthorCommentBadge extends YTNode {
|
|
static type = 'AuthorCommentBadge';
|
|
|
|
#data;
|
|
|
|
icon_type: string | null;
|
|
tooltip: string;
|
|
style?: string;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
|
|
this.icon_type = data.icon?.iconType || null;
|
|
this.tooltip = data.iconTooltip;
|
|
|
|
// *** For consistency
|
|
this.tooltip === 'Verified' &&
|
|
(this.style = 'BADGE_STYLE_TYPE_VERIFIED') &&
|
|
(data.style = 'BADGE_STYLE_TYPE_VERIFIED');
|
|
|
|
this.#data = data;
|
|
}
|
|
|
|
get orig_badge() {
|
|
return this.#data;
|
|
}
|
|
}
|
|
|
|
export default AuthorCommentBadge; |