Skip to content

Commit

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

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

fields: ObservedArray | null;

constructor(data: RawNode) {
super();
this.fields = Parser.parse(data.fields, true, YTNodes.ToggleFormField);

Check failure on line 11 in src/parser/classes/Form.ts

View workflow job for this annotation

GitHub Actions / test

Property 'ToggleFormField' 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 11 in src/parser/classes/Form.ts

View workflow job for this annotation

GitHub Actions / lint

Property 'ToggleFormField' does not exist on type 'typeof import("/home/runner/work/YouTube.js/YouTube.js/src/parser/nodes", { with: { "resolution-mode": "import" } })'.
}
}
1 change: 1 addition & 0 deletions src/parser/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export { default as FeedFilterChipBar } from './classes/FeedFilterChipBar.js';
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 Form } from './classes/Form.js';
export { default as FormFooterView } from './classes/FormFooterView.js';
export { default as GameCard } from './classes/GameCard.js';
export { default as GameDetails } from './classes/GameDetails.js';
Expand Down

0 comments on commit 0de6d01

Please sign in to comment.