mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 11:02:10 +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
604 B
TypeScript
25 lines
604 B
TypeScript
import Text from './misc/Text';
|
|
import Author from './misc/Author';
|
|
import { YTNode } from '../helpers';
|
|
|
|
class VideoOwner extends YTNode {
|
|
static type = 'VideoOwner';
|
|
|
|
subscription_button;
|
|
subscriber_count: Text;
|
|
author: Author;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
// TODO: check this
|
|
this.subscription_button = data.subscriptionButton || null;
|
|
this.subscriber_count = new Text(data.subscriberCountText);
|
|
|
|
this.author = new Author({
|
|
...data.title,
|
|
navigationEndpoint: data.navigationEndpoint
|
|
}, data.badges, data.thumbnail);
|
|
}
|
|
}
|
|
|
|
export default VideoOwner; |