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.
This commit is contained in:
Tim Su
2017-12-29 14:23:05 -08:00
committed by Tim Su
parent 73044764a8
commit a3e3626477
+2
View File
@@ -271,6 +271,8 @@ interface CheerioAPI extends CheerioSelector, CheerioStatic {
load(element: CheerioElement, options?: CheerioOptionsInterface): CheerioStatic;
}
interface Document { }
declare var cheerio:CheerioAPI;
declare module "cheerio" {