feat(parser): Support LockupView and it's child nodes (#609)

This commit is contained in:
absidue
2024-02-29 17:29:53 +01:00
committed by GitHub
parent f95283b236
commit 7ca2a0c3e4
10 changed files with 179 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
import { YTNode } from '../helpers.js';
import { Parser, type RawNode } from '../index.js';
import ContentMetadataView from './ContentMetadataView.js';
import Text from './misc/Text.js';
export default class LockupMetadataView extends YTNode {
static type = 'LockupMetadataView';
title: Text;
metadata: ContentMetadataView | null;
constructor(data: RawNode) {
super();
this.title = Text.fromAttributed(data.title);
this.metadata = Parser.parseItem(data.metadata, ContentMetadataView);
}
}