mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 11:32:27 +00:00
* tests: improve coverage * refactor: clean up nodes * chore: lint * feat(parser): ignore `BrandVideoShelf` Seems to be used for ads. * feat(parser): ignore `BrandVideoSingleton` too
23 lines
620 B
TypeScript
23 lines
620 B
TypeScript
import Text from '../misc/Text.js';
|
|
import Thumbnail from '../misc/Thumbnail.js';
|
|
import { YTNode } from '../../helpers.js';
|
|
import type { RawNode } from '../../index.js';
|
|
|
|
export default class CommentsEntryPointTeaser extends YTNode {
|
|
static type = 'CommentsEntryPointTeaser';
|
|
|
|
teaser_avatar?: Thumbnail[];
|
|
teaser_content?: Text;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
|
|
if (Reflect.has(data, 'teaserAvatar')) {
|
|
this.teaser_avatar = Thumbnail.fromResponse(data.teaserAvatar);
|
|
}
|
|
|
|
if (Reflect.has(data, 'teaserContent')) {
|
|
this.teaser_content = new Text(data.teaserContent);
|
|
}
|
|
}
|
|
} |