chore: update type definitions

This commit is contained in:
LuanRT
2022-06-13 04:19:20 -03:00
parent b3da6b11f8
commit 797c545b80
8 changed files with 32 additions and 21 deletions

View File

@@ -2,6 +2,6 @@ export = RichListHeader;
declare class RichListHeader {
constructor(data: any);
title: Text;
type: any;
icon_type: any;
}
import Text = require("./Text");

View File

@@ -2,9 +2,8 @@ export = SearchRefinementCard;
declare class SearchRefinementCard {
constructor(data: any);
type: string;
thumbnail: any;
thumbnails: any;
endpoint: NavigationEndpoint;
query: Text;
query: any;
}
import NavigationEndpoint = require("./NavigationEndpoint");
import Text = require("./Text");

View File

@@ -2,7 +2,6 @@ export = TwoColumnBrowseResults;
declare class TwoColumnBrowseResults {
constructor(data: any);
type: string;
get tabs(): any;
get secondary_contents(): any;
#private;
tabs: any;
secondary_contents: any;
}

View File

@@ -2,7 +2,6 @@ export = TwoColumnSearchResults;
declare class TwoColumnSearchResults {
constructor(data: any);
type: string;
get primary_contents(): any;
get secondary_contents(): any;
#private;
primary_contents: any;
secondary_contents: any;
}

View File

@@ -2,8 +2,7 @@ export = TwoColumnWatchNextResults;
declare class TwoColumnWatchNextResults {
constructor(data: any);
type: string;
get results(): any;
get secondary_results(): any;
get conversation_bar(): any;
#private;
results: any;
secondary_results: any;
conversation_bar: any;
}

View File

@@ -44,7 +44,7 @@ declare class Parser {
};
static parseRR(actions: any): any;
static parseFormats(formats: any): any;
static parse(data: any, ctx: any): any;
static parse(data: any): any;
static formatError({ classname, classdata, err }: {
classname: any;
classdata: any;

View File

@@ -4,15 +4,30 @@ declare class Search {
/**
* @param {object} response - API response.
* @param {import('../../core/Actions')} actions
* @param {boolean} is_continuation
* @param {object} args
* @param {boolean} [args.is_continuation]
* @constructor
*/
constructor(response: object, actions: import('../../core/Actions'), is_continuation: boolean);
estimated_results: any;
refinements: any;
constructor(response: object, actions: import('../../core/Actions'), args?: {
is_continuation?: boolean;
});
results: any;
refinements: any;
estimated_results: any;
sections: any;
refinement_cards: {
header: any;
cards: any;
};
getContinuation(): Promise<Search>;
/**
* Applies given refinement card and returns a new {@link Search} object.
* @param {SearchRefinementCard || string} refinement card object or query
* @returns {Search}
*/
selectRefinementCard(card: any): Search;
get has_continuation(): boolean;
get refinement_card_queries(): any;
get videos(): any;
get playlists(): any;
get page(): any;

View File

@@ -31,10 +31,10 @@ export function findNode(obj: object, key: string, target: string, depth: number
* Creates a trap to intercept property access
* and add utilities to an object.
*
* @param {*} obj
* @param {object} obj
* @returns
*/
export function observe(obj: any): any;
export function observe(obj: object): any;
/**
* Returns a random user agent.
*