Skip to content

Commit

Permalink
npm install @types/cheerio and support that of latest
Browse files Browse the repository at this point in the history
  • Loading branch information
hideo54 committed May 28, 2021
1 parent c88b245 commit a11c6fc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/index.d.ts
Expand Up @@ -8,7 +8,7 @@ declare namespace scrapeIt {
export interface ScrapeOptionElement {
selector?: string;
convert?: (value: any) => any;
how?: string | ((element: CheerioSelector) => any);
how?: string | ((element: cheerio.Selector) => any);
attr?: string;
trim?: boolean;
closest?: string;
Expand All @@ -24,12 +24,12 @@ declare namespace scrapeIt {

export interface ScrapeResult<T> {
data: T,
$: Cheerio,
$: cheerio.Cheerio,
response: any,
body: string
}

export function scrapeHTML<T>(body: CheerioStatic | string, options: ScrapeOptions): T;
export function scrapeHTML<T>(body: cheerio.Root | string, options: ScrapeOptions): T;
}

declare function scrapeIt<T>(url: string | object, opts: scrapeIt.ScrapeOptions): Promise<scrapeIt.ScrapeResult<T>>;
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -69,6 +69,7 @@
]
},
"dependencies": {
"@types/cheerio": "^0.22.29",
"assured": "^1.0.14",
"cheerio-req": "^1.2.3",
"scrape-it-core": "^1.0.0",
Expand Down

0 comments on commit a11c6fc

Please sign in to comment.