diff --git a/chrome-launcher.ts b/chrome-launcher.ts index d9c0cb22b..53254d1bc 100644 --- a/chrome-launcher.ts +++ b/chrome-launcher.ts @@ -52,9 +52,12 @@ export interface ModuleOverrides { } const sigintListener = async () => { - for (const instance of instances) { + // Since sets are not iterable below es2015 we need + // too `.forEach` iterate over the set. + // https://github.com/Microsoft/TypeScript/issues/6842 + instances.forEach(async (instance) => { await instance.kill(); - } + }); process.exit(_SIGINT_EXIT_CODE); }; diff --git a/manual-chrome-launcher.js b/manual-chrome-launcher.js index be649de9a..fb65e83a3 100755 --- a/manual-chrome-launcher.js +++ b/manual-chrome-launcher.js @@ -14,7 +14,7 @@ */ require('./compiled-check.js')('chrome-launcher.js'); -const {launch} = require('./chrome-launcher'); +const launch = require('./chrome-launcher').launch; const args = process.argv.slice(2); let chromeFlags; diff --git a/tsconfig.json b/tsconfig.json index ecde405c0..6fb278b73 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "target": "es2016", + "target": "es5", "declaration": true, "noImplicitAny": true, "inlineSourceMap": true, @@ -9,7 +9,10 @@ "strictNullChecks": true, "noImplicitReturns": true, "noUnusedLocals": true, - "noUnusedParameters": true + "noUnusedParameters": true, + "lib": [ + "es2015" + ] }, "exclude": [ "node_modules" @@ -17,4 +20,4 @@ "include": [ "*.ts" ] -} +} \ No newline at end of file