fix(cheerio): #attr() can be used without arguments (#20193)

This commit is contained in:
Александр Гренишин
2017-10-09 16:30:37 -07:00
committed by Wesley Wigham
parent 3653200be5
commit c939211aa6
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -52,6 +52,7 @@ var $multiEl = $('selector', 'selector', 'selector');
*/
// attr
$el.attr();
$el.attr('id');
$el.attr('id', 'favorite').html();
+1
View File
@@ -13,6 +13,7 @@ interface Cheerio {
// Attributes
attr(): {[attr: string]: string};
attr(name: string): string;
attr(name: string, value: any): Cheerio;