diff --git a/index.d.ts b/index.d.ts index eeebbd2..e4c38cc 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,11 +7,6 @@ export interface SearchTypes { VIDEO: "EgIQAQ%3D%3D"; } -const Constants = { - SearchTypes, - YoutubeURL: URL.prototype, -} - export interface Thumbnail { url: string; width: number; @@ -79,16 +74,22 @@ export interface SearchOptions { language?: string; } -class Scraper { +declare class Scraper { private _lang: string; public constructor(language?: string); - private _extractData(json: Record): Record[]; - private _fetch(search_query: string, searchType?: keyof SearchTypes, requestedLang?: string): Promise; + private _extractData( + json: Record + ): Record[]; + private _fetch( + search_query: string, + searchType?: keyof SearchTypes, + requestedLang?: string + ): Promise; private _getSearchData(webPage: string): Record; private _parseData(data: Record[]): Results; - public async search(query: string, options?: SearchOptions): Promise; + public search(query: string, options?: SearchOptions): Promise; public setLang(language?: string): void; }