From e23ee8a8dd5c5909ceae48eb23a48d58e443a795 Mon Sep 17 00:00:00 2001 From: Ika Date: Tue, 4 Jul 2017 23:55:07 +0800 Subject: [PATCH 1/2] fix(cheerio): CheerioAPI should extend CheerioStatic --- types/cheerio/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/cheerio/index.d.ts b/types/cheerio/index.d.ts index 4096a0f9c2..f525a46ee6 100644 --- a/types/cheerio/index.d.ts +++ b/types/cheerio/index.d.ts @@ -263,7 +263,7 @@ interface CheerioElement { nodeValue: string; } -interface CheerioAPI extends CheerioSelector { +interface CheerioAPI extends CheerioSelector, CheerioStatic { load(html: string, options?: CheerioOptionsInterface): CheerioStatic; load(element: CheerioElement, options?: CheerioOptionsInterface): CheerioStatic; } From 98fdc33a5308775c27a83b8d1469ba9ee4739126 Mon Sep 17 00:00:00 2001 From: Ika Date: Tue, 4 Jul 2017 23:57:48 +0800 Subject: [PATCH 2/2] test(cheerio): add tests --- types/cheerio/cheerio-tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/cheerio/cheerio-tests.ts b/types/cheerio/cheerio-tests.ts index 1c0848eef7..4a15f029f0 100644 --- a/types/cheerio/cheerio-tests.ts +++ b/types/cheerio/cheerio-tests.ts @@ -306,3 +306,5 @@ $.parseHTML(html, null, true); * Not in doc */ $el.toArray(); + +cheerio.html($el);