Fix unnecessary global inclusion of dom lib

TypeScript packages depending on this and importing `@sindresorhus/is`
end up with the lib.dom.d.ts in global scope thanks to the deleted
lines.

That's almost never what any user of the package would want, and it has
the side effect of putting a slew of common variable names (including
the variable names "event" and "name" and "parent") into a global scope.

It's particularly sinister because on many of these, TypeScript won't
complain, for example "name" is of type never.
This commit is contained in:
Aaron Friel 2019-08-25 00:57:49 -07:00 committed by Aaron Friel
parent 0cbd9df6ce
commit 7d37a7dbbc

View file

@ -1,6 +1,3 @@
/// <reference lib="esnext"/>
/// <reference lib="dom"/>
// TODO: Use the `URL` global when targeting Node.js 10
const URLGlobal = typeof URL === 'undefined' ? require('url').URL : URL;