mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-24 07:11:48 +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/ExpandedShelfContents.ts
Normal file
20
src/parser/classes/ExpandedShelfContents.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Parser from '../index';
|
||||
import { YTNode } from '../helpers';
|
||||
|
||||
class ExpandedShelfContents extends YTNode {
|
||||
static type = 'ExpandedShelfContents';
|
||||
|
||||
items;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.items = Parser.parse(data.items);
|
||||
}
|
||||
|
||||
// XXX: alias for consistency
|
||||
get contents() {
|
||||
return this.items;
|
||||
}
|
||||
}
|
||||
|
||||
export default ExpandedShelfContents;
|
||||
Reference in New Issue
Block a user