mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add overloading to get method
e.g.
```ts
$("a[href]").map((index, element) => $(element).attr("href")).get();
```
it returns an array of strings
This commit is contained in:
Vendored
+1
@@ -106,6 +106,7 @@ interface Cheerio {
|
||||
|
||||
eq(index: number): Cheerio;
|
||||
|
||||
get(): string[];
|
||||
get(): CheerioElement[];
|
||||
get(index: number): CheerioElement;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user