mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-26 16:18:51 +00:00
* dev: finish top-level parsers TS migration
* dev: migrate menu renderers to TS
* chore: fix ts errors
* dev: finish ts migration 🎉
24 lines
525 B
TypeScript
24 lines
525 B
TypeScript
import Parser from '../index';
|
|
import NavigationEndpoint from './NavigationEndpoint';
|
|
import { YTNode } from '../helpers';
|
|
|
|
class ContinuationItem extends YTNode {
|
|
static type = 'ContinuationItem';
|
|
|
|
trigger: string;
|
|
button?;
|
|
endpoint: NavigationEndpoint;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.trigger = data.trigger;
|
|
|
|
if (data.button) {
|
|
this.button = Parser.parse(data.button);
|
|
}
|
|
|
|
this.endpoint = new NavigationEndpoint(data.continuationEndpoint);
|
|
}
|
|
}
|
|
|
|
export default ContinuationItem; |