diff --git a/types/cheerio/cheerio-tests.ts b/types/cheerio/cheerio-tests.ts index 4a15f029f0..1a9821a6bb 100644 --- a/types/cheerio/cheerio-tests.ts +++ b/types/cheerio/cheerio-tests.ts @@ -52,6 +52,7 @@ var $multiEl = $('selector', 'selector', 'selector'); */ // attr +$el.attr(); $el.attr('id'); $el.attr('id', 'favorite').html(); diff --git a/types/cheerio/index.d.ts b/types/cheerio/index.d.ts index f525a46ee6..2037e83c7a 100644 --- a/types/cheerio/index.d.ts +++ b/types/cheerio/index.d.ts @@ -13,6 +13,7 @@ interface Cheerio { // Attributes + attr(): {[attr: string]: string}; attr(name: string): string; attr(name: string, value: any): Cheerio;