Skip to content

Commit

Permalink
Add FormPopup node
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson committed Feb 16, 2025
1 parent 5394edc commit 5e0f7e8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/parser/classes/FormPopup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { type ObservedArray, YTNode } from '../helpers.js';
import { Parser, YTNodes, type RawNode } from '../index.js';

export default class FormPopup extends YTNode {
static type = 'FormPopup';

title: Text;
form: YTNodes.Form | null;

Check failure on line 8 in src/parser/classes/FormPopup.ts

View workflow job for this annotation

GitHub Actions / test

Namespace '"/home/runner/work/YouTube.js/YouTube.js/src/parser/nodes"' has no exported member 'Form'.

Check failure on line 8 in src/parser/classes/FormPopup.ts

View workflow job for this annotation

GitHub Actions / lint

Namespace '"/home/runner/work/YouTube.js/YouTube.js/src/parser/nodes"' has no exported member 'Form'.
buttons: ObservedArray<YTNodes.Button> | null;

constructor(data: RawNode) {
super();
this.title = new Text(data.title);
this.form = Parser.parseItem(data.form, YTNodes.Form);

Check failure on line 14 in src/parser/classes/FormPopup.ts

View workflow job for this annotation

GitHub Actions / test

Property 'Form' does not exist on type 'typeof import("/home/runner/work/YouTube.js/YouTube.js/src/parser/nodes", { with: { "resolution-mode": "import" } })'.

Check failure on line 14 in src/parser/classes/FormPopup.ts

View workflow job for this annotation

GitHub Actions / lint

Property 'Form' does not exist on type 'typeof import("/home/runner/work/YouTube.js/YouTube.js/src/parser/nodes", { with: { "resolution-mode": "import" } })'.
this.buttons = Parser.parse(data.buttons, true, YTNodes.Button);
}
}
1 change: 1 addition & 0 deletions src/parser/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export { default as FeedNudge } from './classes/FeedNudge.js';
export { default as FeedTabbedHeader } from './classes/FeedTabbedHeader.js';
export { default as FlexibleActionsView } from './classes/FlexibleActionsView.js';
export { default as FormFooterView } from './classes/FormFooterView.js';
export { default as FormPopup } from './classes/FormPopup.js';
export { default as GameCard } from './classes/GameCard.js';
export { default as GameDetails } from './classes/GameDetails.js';
export { default as Grid } from './classes/Grid.js';
Expand Down

0 comments on commit 5e0f7e8

Please sign in to comment.