From 1d9587e8c1ee0b11bb0e444c3d1e98162e9e1059 Mon Sep 17 00:00:00 2001 From: LuanRT Date: Fri, 17 Mar 2023 07:27:00 -0300 Subject: [PATCH] feat(ShowingResultsFor): parse all props --- src/parser/classes/ShowingResultsFor.ts | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/parser/classes/ShowingResultsFor.ts b/src/parser/classes/ShowingResultsFor.ts index b0393552..9aeb11db 100644 --- a/src/parser/classes/ShowingResultsFor.ts +++ b/src/parser/classes/ShowingResultsFor.ts @@ -1,20 +1,25 @@ +import { YTNode } from '../helpers.js'; +import type { RawNode } from '../index.js'; import Text from './misc/Text.js'; import NavigationEndpoint from './NavigationEndpoint.js'; -import { YTNode } from '../helpers.js'; -class ShowingResultsFor extends YTNode { +export default class ShowingResultsFor extends YTNode { static type = 'ShowingResultsFor'; corrected_query: Text; - endpoint: NavigationEndpoint; + original_query: Text; + corrected_query_endpoint: NavigationEndpoint; original_query_endpoint: NavigationEndpoint; + search_instead_for: Text; + showing_results_for: Text; - constructor(data: any) { + constructor(data: RawNode) { super(); this.corrected_query = new Text(data.correctedQuery); - this.endpoint = new NavigationEndpoint(data.correctedQueryEndpoint); + this.original_query = new Text(data.originalQuery); + this.corrected_query_endpoint = new NavigationEndpoint(data.correctedQueryEndpoint); this.original_query_endpoint = new NavigationEndpoint(data.originalQueryEndpoint); + this.search_instead_for = new Text(data.searchInsteadFor); + this.showing_results_for = new Text(data.showingResultsFor); } -} - -export default ShowingResultsFor; \ No newline at end of file +} \ No newline at end of file