mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 09:06:51 +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:
23
src/parser/classes/ChannelVideoPlayer.ts
Normal file
23
src/parser/classes/ChannelVideoPlayer.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import Text from './misc/Text';
|
||||
import { YTNode } from '../helpers';
|
||||
|
||||
class ChannelVideoPlayer extends YTNode {
|
||||
static type = 'ChannelVideoPlayer';
|
||||
|
||||
id: string;
|
||||
title: Text;
|
||||
description: Text;
|
||||
views: Text;
|
||||
published: Text;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.id = data.videoId;
|
||||
this.title = new Text(data.title);
|
||||
this.description = new Text(data.description);
|
||||
this.views = new Text(data.viewCountText);
|
||||
this.published = new Text(data.publishedTimeText);
|
||||
}
|
||||
}
|
||||
|
||||
export default ChannelVideoPlayer;
|
||||
Reference in New Issue
Block a user