mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-02 21:52: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/RichGrid.ts
Normal file
20
src/parser/classes/RichGrid.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Parser from '../index';
|
||||
|
||||
import { YTNode } from '../helpers';
|
||||
|
||||
class RichGrid extends YTNode {
|
||||
static type = 'RichGrid';
|
||||
|
||||
header;
|
||||
contents;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
// XXX: we don't parse the masthead since it is usually an advertisement
|
||||
// XXX: reflowOptions aren't parsed, I think its only used internally for layout
|
||||
this.header = Parser.parse(data.header);
|
||||
this.contents = Parser.parse(data.contents);
|
||||
}
|
||||
}
|
||||
|
||||
export default RichGrid;
|
||||
Reference in New Issue
Block a user