From 7d37a7dbbc22c71040f4ba8bfc2c11c81fe81d41 Mon Sep 17 00:00:00 2001 From: Aaron Friel Date: Sun, 25 Aug 2019 00:57:49 -0700 Subject: [PATCH] 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. --- source/index.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/index.ts b/source/index.ts index 9bb06dd..2b670cc 100644 --- a/source/index.ts +++ b/source/index.ts @@ -1,6 +1,3 @@ -/// -/// - // TODO: Use the `URL` global when targeting Node.js 10 const URLGlobal = typeof URL === 'undefined' ? require('url').URL : URL;