mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 09:06:51 +00:00
* dev: finish top-level parsers TS migration
* dev: migrate menu renderers to TS
* chore: fix ts errors
* dev: finish ts migration 🎉
25 lines
449 B
TypeScript
25 lines
449 B
TypeScript
import { YTNode } from '../helpers';
|
|
|
|
class MetadataBadge extends YTNode {
|
|
static type = 'MetadataBadge';
|
|
|
|
icon_type?: string;
|
|
style?: string;
|
|
tooltip: string | null;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
|
|
if (data?.icon) {
|
|
this.icon_type = data.icon.iconType;
|
|
}
|
|
|
|
if (data?.style) {
|
|
this.style = data.style;
|
|
}
|
|
|
|
this.tooltip = data?.tooltip || data?.iconTooltip || null;
|
|
}
|
|
}
|
|
|
|
export default MetadataBadge; |