From a3e3626477c60f42c2e41bf09734fd3fe9c3a75a Mon Sep 17 00:00:00 2001 From: Tim Su Date: Fri, 15 Dec 2017 11:46:24 -0800 Subject: [PATCH] Add placeholder document type Currently, if you compile typescript without the "dom" lib, there is no 'Document' type available, and so the cheerio type definitions will output an error: `error TS2304: Cannot find name 'Document'.`. This adds a blank Document interface so no error is produced. --- types/cheerio/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/cheerio/index.d.ts b/types/cheerio/index.d.ts index 8250848374..42bcae6eff 100644 --- a/types/cheerio/index.d.ts +++ b/types/cheerio/index.d.ts @@ -271,6 +271,8 @@ interface CheerioAPI extends CheerioSelector, CheerioStatic { load(element: CheerioElement, options?: CheerioOptionsInterface): CheerioStatic; } +interface Document { } + declare var cheerio:CheerioAPI; declare module "cheerio" {