From c939211aa6fa9778732bf15a807e247a1c2d2a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=93=D1=80=D0=B5=D0=BD=D0=B8=D1=88=D0=B8=D0=BD?= Date: Tue, 10 Oct 2017 02:30:37 +0300 Subject: [PATCH] fix(cheerio): #attr() can be used without arguments (#20193) --- types/cheerio/cheerio-tests.ts | 1 + types/cheerio/index.d.ts | 1 + 2 files changed, 2 insertions(+) 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;