mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 00:56:23 +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:
20
src/parser/classes/ChannelThumbnailWithLink.ts
Normal file
20
src/parser/classes/ChannelThumbnailWithLink.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Thumbnail from './misc/Thumbnail';
|
||||
import NavigationEndpoint from './NavigationEndpoint';
|
||||
import { YTNode } from '../helpers';
|
||||
|
||||
class ChannelThumbnailWithLink extends YTNode {
|
||||
static type = 'ChannelThumbnailWithLink';
|
||||
|
||||
thumbnails: Thumbnail[];
|
||||
endpoint: NavigationEndpoint;
|
||||
label: string;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.thumbnails = Thumbnail.fromResponse(data.thumbnail);
|
||||
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
||||
this.label = data.accessibility.accessibilityData.label;
|
||||
}
|
||||
}
|
||||
|
||||
export default ChannelThumbnailWithLink;
|
||||
Reference in New Issue
Block a user