Reference lib "dom"

Currently lib "dom" is required for compilation.

However, including "dom" in lib can cause some opaque bugs on a server.

For example, the TS compiler won't complain when using `fetch` without something like `import fetch from "node-fetch"` or using `URL` without `import { URL } from "url"`.
This commit is contained in:
Sebastian Richter
2018-11-13 10:46:14 +01:00
committed by GitHub
parent 25c1536264
commit 67f14c9a73
+1
View File
@@ -5,6 +5,7 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference lib="dom" />
/// <reference types="node" />
import { EventEmitter } from 'events';