title: Typescript compiler: Cannot find name 'Map'
body: <p>I have Electron + Angular app. I would like to use Typescript for Electron, so I have main.ts file and want to compile it to main.js using 'tsc main.ts'. However, I get the following error:</p>
  
  <p>node_modules/@types/selenium-webdriver/remote.d.ts:139:29 - error TS2304: Cannot find name 'Map'.</p>
  
  <p>Still main.js is generated and can be used when i run electron without tsc command. However, I would like it run by one script without any error.</p>
  
  <p>My tsconfig.json contains:</p>
  
  <pre><code>{
   "compileOnSave": false,
   "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "es2015",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
     ],
    "lib": [
     "es2017",
     "dom"
    ]
   }
  }
  </code></pre>
  
  <p>I've already tried various combinations of target and lib configuration (e.g. es6) but with no success.</p>
  
  <p>Can anybody please help?
  Many thanks!</p>