Using the Watson API from Node

The IBM Watson API is part of IBM Bluemix, which appears to be be a fairly similar offerings to AWS.

The “Watson” part of the offering has several analysis APIs, including image recognition, text analysis, speech to text, translation, etc.

In this example, I’ll show how to access the “Alchemy” API from Node. Alchemy gives you a wide range of basic natural language processing – in this case I’ll test out the sentiment analysis API (https://gateway-a.watsonplatform.net/calls/text/TextGetTextSentiment). If you’re looking to use this, it gives you 1,000 free API calls per day, and then is metered. Pricing per API call varies depending on which call it is, and how difficult or commoditized the operation is. The APIs that are in Beta appear to be generally more free as well.

When you set up an account, you can activate one of these APIs on your account through the portal:

Note that if you use the free version they require you to include sourcing in your application:

Usage Restrictions

Usage of AlchemyAPI should abide by the restrictions of your respective API tier. Approved academic users are permitted to make a maximum of 30,000 API calls each day (or 1,000 daily calls for commercial use). More daily API calls (up to 200,000,000 daily) are available through an AlchemyAPI Subscription Plan.

Users of the AlchemyAPI Free service tier must provide proper attribution within their website or application:

Provide a clickable hyperlink to www.alchemyapi.com with the text "Text Analysis by AlchemyAPI" within your website or application; and

Provide attribution to AlchemyAPI within any published works that are based on or mention AlchemyAPI, or content generated by AlchemyAPI, including but not limited to research papers and journal articles.

Provide attribution to AlchemyAPI within all web pages or documents where AlchemyAPI content and/or API results are used or displayed.

Other usage restrictions are listed in the AlchemyAPI Terms of Use policy.

When you call this API, you just need an API key, and then a payload of request parameters:

let apiCall = {
  apikey: apikey,
  text: text,
  outputMode: 'json',
  showSourceMode: 0
};
 
post('https://gateway-a.watsonplatform.net' + baseUrl + endpoint,
  {form: apiCall},
    (err, response, body) => {
      if (!!err) {
        console.log(err);  
      }
 
      writeFile(
        filename,
        body
      );             
    }
);

I like to write each API call out to it’s own JSON file – this way I don’t risk calling the same API call multiple times and wasting resources, so around the above code I leave a check to make sure that the API output isn’t already downloaded:

let filename: string = 
  "json/watson/" + field + "_" + endpoint + "_" + id + ".json";
 
if (existsSync(filename)) {
  console.log("Skipping " + filename);
} else {
   console.log("Analyzing " + filename);
 
   ... 
}

When I do this, I’m starting from a folder where I have a series of JSON files I want to analyse. To do this, you need to read the folder:

readdir("json/1",
  (err, files) => {
    process(files, 1, () => {console.log("finished!")});
  });

Then the “process” function is recursive, or else you get a “too many open files” error.

function process(files, i, finish) {
  let filename = files[i];
  let id = (filename.split("."))[0];
 
  readFile(
    "json/1/" + filename,
    (err, content) => {   
      fields.map(
        (field) => {
          apiCalls.map(
            (endpoint) => 
              Try( () => {       
                if (!!err) {               
                  console.log(err);
                  return;
                }
 
                let json: string = JSON.parse(content + '');
                let text: string = json[field];
 
                analyze(field, endpoint, id, text);
 
                if (i < files.length) {
                  process(files, i + 1, finish);
                } else {
                  finish();
                }
              }, "Parsing file " + id) 
          )
        })
    });
}

When this runs successfully, you get output that looks like the following example – this is using the transcript from a university lecture. I did find it a little disappointing that this only gives you a single data value, where the Watson demo gives you hundreds, so it appears that you pay for every data point that you get out.

{
    "status": "OK",
    "usage": "By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html",
    "totalTransactions": "1",
    "language": "english",
    "docSentiment": {
        "mixed": "1",
        "score": "0.214952",
        "type": "positive"
    }
}

If you run this too many times, you’ll get an API call that looks like this:

{
    "status": "ERROR",
    "statusInfo": "daily-transaction-limit-exceeded"
}

This is a bit of a pain, because you can get a lot of these (the sentiment API is quite fast, so it takes less than a minute to run out of calls).

When running this, I found it was helpful to inject a logging utility to print out HTTP calls – this helps in the event you screw up something in the Node library to do external requests:

requestLogger(require('https'));

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

Fixing node error: 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:

If you try to make a a request in Node.js over HTTPS, you can get an error like this:

101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:

This can occur if you set the port on the URL, forcing it to communicate over a non HTTPs port.

For instance, in this example, port should be 443, or left out entirely:

var options = {
  hostname: 'gateway-a.watsonplatform.net',
  path: url + endpoint,
  port: 80,
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Content-Length': postData.length
  }
};
 
request(options, function(res) {
  ...
});

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

TypeScript: typings example

Typings is a command line utility that helps you find type bindings for various libraries. Basically, it works a lot like NPM, but it only manages the mappings from library -> type. If you’ve used C/C++, this is like a Maven/NPM for .H (header) files.

Let’s take an example – first, we’ll install the utility:

npm install -g typings

Then we can search for stuff:

typings search react

Which apparently does a “contains” search:

NAME                              SOURCE HOMEPAGE                                           DESCRIPTION UPDATED                 
griddle-react                     npm    https://www.npmjs.com/package/griddle-react                    2016-04-13T18:36:51.000Z
mobservable-react                 dt     https://github.com/mweststrate/mobservable-react               2016-03-16T15:55:26.000Z
react                             dt     http://facebook.github.io/react/                               2016-04-23T06:59:14.000Z
react-addons-create-fragment      dt     http://facebook.github.io/react/                               2016-03-16T15:55:26.000Z
react-addons-css-transition-group dt     http://facebook.github.io/react/                               2016-03-16T15:55:26.000Z
react-addons-linked-state-mixin   dt     http://facebook.github.io/react/                               2016-03-16T15:55:26.000Z
react-addons-perf                 dt     http://facebook.github.io/react/                               2016-03-16T15:55:26.000Z
react-addons-pure-render-mixin    dt     http://facebook.github.io/react/                               2016-03-16T15:55:26.000Z
react-addons-shallow-compare      dt     http://facebook.github.io/react/                               2016-03-16T15:55:26.000Z
react-addons-test-utils           dt     http://facebook.github.io/react/                               2016-04-17T14:49:49.000Z
react-addons-transition-group     dt     http://facebook.github.io/react/                               2016-04-17T13:41:18.000Z
react-addons-update               dt     http://facebook.github.io/react/                               2016-03-16T15:55:26.000Z
react-addons-update               npm    https://www.npmjs.com/package/react-addons-update              2016-03-24T04:43:46.000Z
react-bootstrap                   dt     https://github.com/react-bootstrap/react-bootstrap             2016-04-23T13:55:14.000Z
react-bootstrap-table             dt     https://github.com/AllenFang/react-bootstrap-table             2016-02-04T15:58:49.000Z
react-cropper                     dt     https://github.com/roadmanfong/react-cropper                   2016-04-03T14:21:19.000Z
react-datagrid                    dt     https://github.com/zippyui/react-datagrid.git                  2016-03-16T15:55:26.000Z
react-day-picker                  dt     https://github.com/gpbl/react-day-picker                       2016-03-16T15:55:26.000Z
react-dnd                         dt     https://github.com/gaearon/react-dnd                           2016-03-16T15:55:26.000Z
react-dom                         dt     http://facebook.github.io/react/                               2016-04-12T15:40:40.000Z

You can do an exact search by name, if you know what you want:

typings search --name react

You can then install this by running this command (note “dt” is the source, it’s optional if the source is npm, and for bash you need the apostrophes)

typings install 'dt!react' --ambient --save

Once this works, it makes a file called “typings.json”:

{
  "dependencies": {
    "react": "registry:dt/react#0.14.0+20160423065914"
  }
}

If you get a project from another developer, you may need to run this:

typings install

This is also a good way to fix your local libraries if you end up with duplicates or things you don’t want (first, delete the “typings folder).

To import Typings files, you can add a reference comment at the top of your ts/tsx file:

/// <reference path="../typings/main.d.ts"/>

Or include it as a line in tsconfig.json:

{
    "compilerOptions": {
    "module": "commonjs",
    "target": "es5",
    "jsx": "react",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "outDir": "dist"
    },
    "exclude": [
      "node_modules",
      "dist",
      "node_modules",
      "typings"
    ],
    "files": [
      "./app/index.tsx",
      "./typings/main.d.ts"
    ]
}

The “ambient” flag above is used to tell Typescript that the library you’re importing is some external one (“ambient” meaning part of the external environment).

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

Fixing Typescript error: error TS2304: Cannot find name ‘React’.

If you try to do an import in Typescript, you can get an error like this:

index.tsx(10,25): error TS2304: Cannot find name 'React'.

In order to do an import successfully, you probably did something like below, or set up tsconfig.json (either should work):

/// 

When you write the Javascript code, it should look similar to the following:

Garys-MBP:youtube gary$ cat app/index.tsx
import * as React from 'react';
 
interface IMessage {
  msg: String;
}
 
class TestApp extends React.Component<IMessage, {}> {
  public render(): Element {
    return <div>test</div>;
  }
}

If you’re receiving the above error, the most likely cause is that you have a case-sensitivity issue: either you’re alternating case in Javascript class names, or you installed “React” with npm but reference it as “react” in your import (make sure you are consistent within your project, or this will fail hard)

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

TypeScript import example

In Typescript “imports” are called “references”.

If you have a type definition file (.d.ts) you can import it directly with a comment:

/// <reference path="../typings/jquery.d.ts"/>

I think most people at the moment are moving to a tool called “typings”, which helps you find an manage local copes of these files for your libraries.

The type definition files feel a little kludgey, but they really are equivalent to .h (header) files in C, basically you’re defining that something exists, but the actual call will be handled post-compilation: at runtime, in the case of Javascript, rather than using a linker, in C.

Because of this property, Typescript tends to try to generate Javascript code if it can, even if it thinks you’re doing something that is a bad idea. I’ve so far found a lot of minor defects because of it’s enforcement, although pretty much any error has been a warning.

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

Typings: “reference” example

When you set up Typings, you’ll need to run the following commands to get React to work:

typings init
typings install 'dt!react' --ambient --save
npm install react --save

This installs React type bindings, and the library. Note these are really separate things, NPM installs the actual code for React, and typings handles the type bindings, which enforce constraints.

If you do this without ‘ambient’ you get the error below:

typings/main/definitions/react/index.d.ts(2322,5): error TS2666: Exports and export assignments are not permitted in module augmentations.

If you mess this up, you can edit the typings.json to fix it, delete the typings folder, and run typings init again.

To actually reference the files Typings has installed, you can do this:

/// <reference path="../typings/main.d.ts"/>
'use strict';
 
import * as React from 'react';
 
interface IMessage {
  msg: String;
}
 
class TestApp extends React.Component<IMessage, {}> {
  public render(): Element {
    return <div>test</div>;
  }
}

The “main.d.ts” file pulls in type bindings for all libraries you’ve installed. If you want to reference them directly (e.g. to avoid conflicts) you can also do that.

Alternately, you can create a tsconfig.json, and by writting this out you can remove the “reference” comment entirely:

{
    "compilerOptions": {
    "module": "commonjs",
    "target": "es5",
    "jsx": "react",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "outDir": "dist"
    },
    "exclude": [
      "node_modules",
      "dist",
      "node_modules",
      "typings"
    ],
    "files": [
      "./app/index.tsx",
      "./typings/main.d.ts"
    ]
}

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

Fixing typescript error: Cannot find module ‘./categories’.

If you try to import a js file you’ve written, you may get an error like this:

Cannot find module './categories'.

Doing something like this:

import * as categories from "./categories";

In this case I have a file called “categories.js”.

The easiest way to fix this is to rename the file to “categories.ts”. Otherwise, Typescript things you might need a type mapping (the other way to fix this is to add a .d.ts file for your other library, so it has a type mapping)

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

Typescript error: Duplicate identifier errors using Node bindings

If you try to set up node with typescript / typings, you can get duplicate identifier errors, if you don’t do it quite right (I’ve listed what this looks like below).

To fix this, look in typings/main.d.ts and you will likely find duplicates (e.g. perhaps you installed Node bindings with both –ambient and without)

This is what you want:

/// <reference path="main/ambient/node/index.d.ts" />

Not this:

/// <reference path="main/ambient/node/index.d.ts" />
/// <reference path="main/definitions/node/index.d.ts" />
typings/main/ambient/node/index.d.ts(455,9): error TS2502: 'BuffType' is referenced directly or indirectly in its own type annotation.
typings/main/ambient/node/index.d.ts(456,9): error TS2502: 'SlowBuffType' is referenced directly or indirectly in its own type annotation.
typings/main/ambient/node/index.d.ts(457,26): error TS2300: Duplicate identifier 'Buffer'.
typings/main/ambient/node/index.d.ts(457,50): error TS2300: Duplicate identifier 'SlowBuffer'.
typings/main/ambient/node/index.d.ts(462,9): error TS2300: Duplicate identifier 'encodeURIComponent'.
typings/main/ambient/node/index.d.ts(466,9): error TS2300: Duplicate identifier 'maxKeys'.
typings/main/ambient/node/index.d.ts(467,9): error TS2300: Duplicate identifier 'decodeURIComponent'.
typings/main/ambient/node/index.d.ts(478,18): error TS2300: Duplicate identifier 'EventEmitter'.
typings/main/ambient/node/index.d.ts(502,9): error TS2300: Duplicate identifier 'protocol'.
typings/main/ambient/node/index.d.ts(503,9): error TS2300: Duplicate identifier 'host'.
typings/main/ambient/node/index.d.ts(504,9): error TS2300: Duplicate identifier 'hostname'.
typings/main/ambient/node/index.d.ts(505,9): error TS2300: Duplicate identifier 'family'.
typings/main/ambient/node/index.d.ts(506,9): error TS2300: Duplicate identifier 'port'.
typings/main/ambient/node/index.d.ts(507,9): error TS2300: Duplicate identifier 'localAddress'.
typings/main/ambient/node/index.d.ts(508,9): error TS2300: Duplicate identifier 'socketPath'.
typings/main/ambient/node/index.d.ts(509,9): error TS2300: Duplicate identifier 'method'.
typings/main/ambient/node/index.d.ts(510,9): error TS2300: Duplicate identifier 'path'.
typings/main/ambient/node/index.d.ts(511,9): error TS2300: Duplicate identifier 'headers'.
typings/main/ambient/node/index.d.ts(512,9): error TS2300: Duplicate identifier 'auth'.
typings/main/ambient/node/index.d.ts(513,9): error TS2300: Duplicate identifier 'agent'.
typings/main/ambient/node/index.d.ts(518,9): error TS2300: Duplicate identifier 'maxHeadersCount'.
typings/main/ambient/node/index.d.ts(519,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/ambient/node/index.d.ts(525,9): error TS2300: Duplicate identifier 'connection'.
typings/main/ambient/node/index.d.ts(538,9): error TS2300: Duplicate identifier 'statusCode'.
typings/main/ambient/node/index.d.ts(539,9): error TS2300: Duplicate identifier 'statusMessage'.
typings/main/ambient/node/index.d.ts(540,9): error TS2300: Duplicate identifier 'headersSent'.
typings/main/ambient/node/index.d.ts(542,9): error TS2300: Duplicate identifier 'sendDate'.
typings/main/ambient/node/index.d.ts(582,9): error TS2300: Duplicate identifier 'httpVersion'.
typings/main/ambient/node/index.d.ts(583,9): error TS2300: Duplicate identifier 'headers'.
typings/main/ambient/node/index.d.ts(584,9): error TS2300: Duplicate identifier 'rawHeaders'.
typings/main/ambient/node/index.d.ts(585,9): error TS2300: Duplicate identifier 'trailers'.
typings/main/ambient/node/index.d.ts(586,9): error TS2300: Duplicate identifier 'rawTrailers'.
typings/main/ambient/node/index.d.ts(591,9): error TS2300: Duplicate identifier 'method'.
typings/main/ambient/node/index.d.ts(595,9): error TS2300: Duplicate identifier 'url'.
typings/main/ambient/node/index.d.ts(599,9): error TS2300: Duplicate identifier 'statusCode'.
typings/main/ambient/node/index.d.ts(603,9): error TS2300: Duplicate identifier 'statusMessage'.
typings/main/ambient/node/index.d.ts(604,9): error TS2300: Duplicate identifier 'socket'.
typings/main/ambient/node/index.d.ts(615,9): error TS2300: Duplicate identifier 'keepAlive'.
typings/main/ambient/node/index.d.ts(620,9): error TS2300: Duplicate identifier 'keepAliveMsecs'.
typings/main/ambient/node/index.d.ts(624,9): error TS2300: Duplicate identifier 'maxSockets'.
typings/main/ambient/node/index.d.ts(628,9): error TS2300: Duplicate identifier 'maxFreeSockets'.
typings/main/ambient/node/index.d.ts(631,18): error TS2300: Duplicate identifier 'Agent'.
typings/main/ambient/node/index.d.ts(665,9): error TS2300: Duplicate identifier 'exec'.
typings/main/ambient/node/index.d.ts(666,9): error TS2300: Duplicate identifier 'args'.
typings/main/ambient/node/index.d.ts(667,9): error TS2300: Duplicate identifier 'silent'.
typings/main/ambient/node/index.d.ts(671,9): error TS2300: Duplicate identifier 'address'.
typings/main/ambient/node/index.d.ts(672,9): error TS2300: Duplicate identifier 'port'.
typings/main/ambient/node/index.d.ts(673,9): error TS2300: Duplicate identifier 'addressType'.
typings/main/ambient/node/index.d.ts(676,18): error TS2300: Duplicate identifier 'Worker'.
typings/main/ambient/node/index.d.ts(719,36): error TS2300: Duplicate identifier 'chunkSize'.
typings/main/ambient/node/index.d.ts(719,56): error TS2300: Duplicate identifier 'windowBits'.
typings/main/ambient/node/index.d.ts(719,77): error TS2300: Duplicate identifier 'level'.
typings/main/ambient/node/index.d.ts(719,93): error TS2300: Duplicate identifier 'memLevel'.
typings/main/ambient/node/index.d.ts(719,112): error TS2300: Duplicate identifier 'strategy'.
typings/main/ambient/node/index.d.ts(719,131): error TS2300: Duplicate identifier 'dictionary'.
typings/main/ambient/node/index.d.ts(788,9): error TS2300: Duplicate identifier 'model'.
typings/main/ambient/node/index.d.ts(789,9): error TS2300: Duplicate identifier 'speed'.
typings/main/ambient/node/index.d.ts(790,9): error TS2300: Duplicate identifier 'times'.
typings/main/ambient/node/index.d.ts(800,9): error TS2300: Duplicate identifier 'address'.
typings/main/ambient/node/index.d.ts(801,9): error TS2300: Duplicate identifier 'netmask'.
typings/main/ambient/node/index.d.ts(802,9): error TS2300: Duplicate identifier 'family'.
typings/main/ambient/node/index.d.ts(803,9): error TS2300: Duplicate identifier 'mac'.
typings/main/ambient/node/index.d.ts(804,9): error TS2300: Duplicate identifier 'internal'.
typings/main/ambient/node/index.d.ts(830,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/ambient/node/index.d.ts(831,9): error TS2300: Duplicate identifier 'key'.
typings/main/ambient/node/index.d.ts(832,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/ambient/node/index.d.ts(833,9): error TS2300: Duplicate identifier 'cert'.
typings/main/ambient/node/index.d.ts(834,9): error TS2300: Duplicate identifier 'ca'.
typings/main/ambient/node/index.d.ts(835,9): error TS2300: Duplicate identifier 'crl'.
typings/main/ambient/node/index.d.ts(836,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/ambient/node/index.d.ts(837,9): error TS2300: Duplicate identifier 'honorCipherOrder'.
typings/main/ambient/node/index.d.ts(838,9): error TS2300: Duplicate identifier 'requestCert'.
typings/main/ambient/node/index.d.ts(839,9): error TS2300: Duplicate identifier 'rejectUnauthorized'.
typings/main/ambient/node/index.d.ts(840,9): error TS2300: Duplicate identifier 'NPNProtocols'.
typings/main/ambient/node/index.d.ts(841,9): error TS2300: Duplicate identifier 'SNICallback'.
typings/main/ambient/node/index.d.ts(845,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/ambient/node/index.d.ts(846,9): error TS2300: Duplicate identifier 'key'.
typings/main/ambient/node/index.d.ts(847,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/ambient/node/index.d.ts(848,9): error TS2300: Duplicate identifier 'cert'.
typings/main/ambient/node/index.d.ts(849,9): error TS2300: Duplicate identifier 'ca'.
typings/main/ambient/node/index.d.ts(850,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/ambient/node/index.d.ts(851,9): error TS2300: Duplicate identifier 'rejectUnauthorized'.
typings/main/ambient/node/index.d.ts(852,9): error TS2300: Duplicate identifier 'secureProtocol'.
typings/main/ambient/node/index.d.ts(856,9): error TS2300: Duplicate identifier 'maxSockets'.
typings/main/ambient/node/index.d.ts(857,9): error TS2300: Duplicate identifier 'sockets'.
typings/main/ambient/node/index.d.ts(858,9): error TS2300: Duplicate identifier 'requests'.
typings/main/ambient/node/index.d.ts(888,9): error TS2300: Duplicate identifier 'prompt'.
typings/main/ambient/node/index.d.ts(889,9): error TS2300: Duplicate identifier 'input'.
typings/main/ambient/node/index.d.ts(890,9): error TS2300: Duplicate identifier 'output'.
typings/main/ambient/node/index.d.ts(891,9): error TS2300: Duplicate identifier 'terminal'.
typings/main/ambient/node/index.d.ts(892,9): error TS2300: Duplicate identifier 'eval'.
typings/main/ambient/node/index.d.ts(893,9): error TS2300: Duplicate identifier 'useColors'.
typings/main/ambient/node/index.d.ts(894,9): error TS2300: Duplicate identifier 'useGlobal'.
typings/main/ambient/node/index.d.ts(895,9): error TS2300: Duplicate identifier 'ignoreUndefined'.
typings/main/ambient/node/index.d.ts(896,9): error TS2300: Duplicate identifier 'writer'.
typings/main/ambient/node/index.d.ts(906,9): error TS2300: Duplicate identifier 'sequence'.
typings/main/ambient/node/index.d.ts(907,9): error TS2300: Duplicate identifier 'name'.
typings/main/ambient/node/index.d.ts(908,9): error TS2300: Duplicate identifier 'ctrl'.
typings/main/ambient/node/index.d.ts(909,9): error TS2300: Duplicate identifier 'meta'.
typings/main/ambient/node/index.d.ts(910,9): error TS2300: Duplicate identifier 'shift'.
typings/main/ambient/node/index.d.ts(929,9): error TS2300: Duplicate identifier 'completions'.
typings/main/ambient/node/index.d.ts(930,9): error TS2300: Duplicate identifier 'line'.
typings/main/ambient/node/index.d.ts(934,9): error TS2300: Duplicate identifier 'input'.
typings/main/ambient/node/index.d.ts(935,9): error TS2300: Duplicate identifier 'output'.
typings/main/ambient/node/index.d.ts(936,9): error TS2300: Duplicate identifier 'completer'.
typings/main/ambient/node/index.d.ts(937,9): error TS2300: Duplicate identifier 'terminal'.
typings/main/ambient/node/index.d.ts(938,9): error TS2300: Duplicate identifier 'historySize'.
typings/main/ambient/node/index.d.ts(953,9): error TS2300: Duplicate identifier 'filename'.
typings/main/ambient/node/index.d.ts(954,9): error TS2300: Duplicate identifier 'lineOffset'.
typings/main/ambient/node/index.d.ts(955,9): error TS2300: Duplicate identifier 'columnOffset'.
typings/main/ambient/node/index.d.ts(956,9): error TS2300: Duplicate identifier 'displayErrors'.
typings/main/ambient/node/index.d.ts(957,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/ambient/node/index.d.ts(958,9): error TS2300: Duplicate identifier 'cachedData'.
typings/main/ambient/node/index.d.ts(959,9): error TS2300: Duplicate identifier 'produceCachedData'.
typings/main/ambient/node/index.d.ts(962,9): error TS2300: Duplicate identifier 'filename'.
typings/main/ambient/node/index.d.ts(963,9): error TS2300: Duplicate identifier 'lineOffset'.
typings/main/ambient/node/index.d.ts(964,9): error TS2300: Duplicate identifier 'columnOffset'.
typings/main/ambient/node/index.d.ts(965,9): error TS2300: Duplicate identifier 'displayErrors'.
typings/main/ambient/node/index.d.ts(966,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/ambient/node/index.d.ts(968,18): error TS2300: Duplicate identifier 'Script'.
typings/main/ambient/node/index.d.ts(987,9): error TS2300: Duplicate identifier 'stdin'.
typings/main/ambient/node/index.d.ts(988,9): error TS2300: Duplicate identifier 'stdout'.
typings/main/ambient/node/index.d.ts(989,9): error TS2300: Duplicate identifier 'stderr'.
typings/main/ambient/node/index.d.ts(990,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/ambient/node/index.d.ts(991,9): error TS2300: Duplicate identifier 'pid'.
typings/main/ambient/node/index.d.ts(999,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/ambient/node/index.d.ts(1000,9): error TS2300: Duplicate identifier 'env'.
typings/main/ambient/node/index.d.ts(1001,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/ambient/node/index.d.ts(1002,9): error TS2300: Duplicate identifier 'detached'.
typings/main/ambient/node/index.d.ts(1003,9): error TS2300: Duplicate identifier 'uid'.
typings/main/ambient/node/index.d.ts(1004,9): error TS2300: Duplicate identifier 'gid'.
typings/main/ambient/node/index.d.ts(1005,9): error TS2300: Duplicate identifier 'shell'.
typings/main/ambient/node/index.d.ts(1010,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/ambient/node/index.d.ts(1011,9): error TS2300: Duplicate identifier 'env'.
typings/main/ambient/node/index.d.ts(1012,9): error TS2300: Duplicate identifier 'shell'.
typings/main/ambient/node/index.d.ts(1013,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/ambient/node/index.d.ts(1014,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/ambient/node/index.d.ts(1015,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/ambient/node/index.d.ts(1016,9): error TS2300: Duplicate identifier 'uid'.
typings/main/ambient/node/index.d.ts(1017,9): error TS2300: Duplicate identifier 'gid'.
typings/main/ambient/node/index.d.ts(1020,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1023,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1032,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/ambient/node/index.d.ts(1033,9): error TS2300: Duplicate identifier 'env'.
typings/main/ambient/node/index.d.ts(1034,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/ambient/node/index.d.ts(1035,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/ambient/node/index.d.ts(1036,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/ambient/node/index.d.ts(1037,9): error TS2300: Duplicate identifier 'uid'.
typings/main/ambient/node/index.d.ts(1038,9): error TS2300: Duplicate identifier 'gid'.
typings/main/ambient/node/index.d.ts(1041,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1044,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1058,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/ambient/node/index.d.ts(1059,9): error TS2300: Duplicate identifier 'env'.
typings/main/ambient/node/index.d.ts(1060,9): error TS2300: Duplicate identifier 'execPath'.
typings/main/ambient/node/index.d.ts(1061,9): error TS2300: Duplicate identifier 'execArgv'.
typings/main/ambient/node/index.d.ts(1062,9): error TS2300: Duplicate identifier 'silent'.
typings/main/ambient/node/index.d.ts(1063,9): error TS2300: Duplicate identifier 'uid'.
typings/main/ambient/node/index.d.ts(1064,9): error TS2300: Duplicate identifier 'gid'.
typings/main/ambient/node/index.d.ts(1069,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/ambient/node/index.d.ts(1070,9): error TS2300: Duplicate identifier 'input'.
typings/main/ambient/node/index.d.ts(1071,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/ambient/node/index.d.ts(1072,9): error TS2300: Duplicate identifier 'env'.
typings/main/ambient/node/index.d.ts(1073,9): error TS2300: Duplicate identifier 'uid'.
typings/main/ambient/node/index.d.ts(1074,9): error TS2300: Duplicate identifier 'gid'.
typings/main/ambient/node/index.d.ts(1075,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/ambient/node/index.d.ts(1076,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/ambient/node/index.d.ts(1077,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/ambient/node/index.d.ts(1078,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1079,9): error TS2300: Duplicate identifier 'shell'.
typings/main/ambient/node/index.d.ts(1082,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1085,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1088,9): error TS2300: Duplicate identifier 'pid'.
typings/main/ambient/node/index.d.ts(1089,9): error TS2300: Duplicate identifier 'output'.
typings/main/ambient/node/index.d.ts(1090,9): error TS2300: Duplicate identifier 'stdout'.
typings/main/ambient/node/index.d.ts(1091,9): error TS2300: Duplicate identifier 'stderr'.
typings/main/ambient/node/index.d.ts(1092,9): error TS2300: Duplicate identifier 'status'.
typings/main/ambient/node/index.d.ts(1093,9): error TS2300: Duplicate identifier 'signal'.
typings/main/ambient/node/index.d.ts(1094,9): error TS2300: Duplicate identifier 'error'.
typings/main/ambient/node/index.d.ts(1105,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/ambient/node/index.d.ts(1106,9): error TS2300: Duplicate identifier 'input'.
typings/main/ambient/node/index.d.ts(1107,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/ambient/node/index.d.ts(1108,9): error TS2300: Duplicate identifier 'env'.
typings/main/ambient/node/index.d.ts(1109,9): error TS2300: Duplicate identifier 'shell'.
typings/main/ambient/node/index.d.ts(1110,9): error TS2300: Duplicate identifier 'uid'.
typings/main/ambient/node/index.d.ts(1111,9): error TS2300: Duplicate identifier 'gid'.
typings/main/ambient/node/index.d.ts(1112,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/ambient/node/index.d.ts(1113,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/ambient/node/index.d.ts(1114,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/ambient/node/index.d.ts(1115,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1118,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1121,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1129,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/ambient/node/index.d.ts(1130,9): error TS2300: Duplicate identifier 'input'.
typings/main/ambient/node/index.d.ts(1131,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/ambient/node/index.d.ts(1132,9): error TS2300: Duplicate identifier 'env'.
typings/main/ambient/node/index.d.ts(1133,9): error TS2300: Duplicate identifier 'uid'.
typings/main/ambient/node/index.d.ts(1134,9): error TS2300: Duplicate identifier 'gid'.
typings/main/ambient/node/index.d.ts(1135,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/ambient/node/index.d.ts(1136,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/ambient/node/index.d.ts(1137,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/ambient/node/index.d.ts(1138,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1141,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1144,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1157,9): error TS2300: Duplicate identifier 'href'.
typings/main/ambient/node/index.d.ts(1158,9): error TS2300: Duplicate identifier 'protocol'.
typings/main/ambient/node/index.d.ts(1159,9): error TS2300: Duplicate identifier 'auth'.
typings/main/ambient/node/index.d.ts(1160,9): error TS2300: Duplicate identifier 'hostname'.
typings/main/ambient/node/index.d.ts(1161,9): error TS2300: Duplicate identifier 'port'.
typings/main/ambient/node/index.d.ts(1162,9): error TS2300: Duplicate identifier 'host'.
typings/main/ambient/node/index.d.ts(1163,9): error TS2300: Duplicate identifier 'pathname'.
typings/main/ambient/node/index.d.ts(1164,9): error TS2300: Duplicate identifier 'search'.
typings/main/ambient/node/index.d.ts(1165,9): error TS2300: Duplicate identifier 'query'.
typings/main/ambient/node/index.d.ts(1166,9): error TS2300: Duplicate identifier 'slashes'.
typings/main/ambient/node/index.d.ts(1167,9): error TS2300: Duplicate identifier 'hash'.
typings/main/ambient/node/index.d.ts(1168,9): error TS2300: Duplicate identifier 'path'.
typings/main/ambient/node/index.d.ts(1204,9): error TS2300: Duplicate identifier 'bufferSize'.
typings/main/ambient/node/index.d.ts(1217,9): error TS2300: Duplicate identifier 'remoteAddress'.
typings/main/ambient/node/index.d.ts(1218,9): error TS2300: Duplicate identifier 'remoteFamily'.
typings/main/ambient/node/index.d.ts(1219,9): error TS2300: Duplicate identifier 'remotePort'.
typings/main/ambient/node/index.d.ts(1220,9): error TS2300: Duplicate identifier 'localAddress'.
typings/main/ambient/node/index.d.ts(1221,9): error TS2300: Duplicate identifier 'localPort'.
typings/main/ambient/node/index.d.ts(1222,9): error TS2300: Duplicate identifier 'bytesRead'.
typings/main/ambient/node/index.d.ts(1223,9): error TS2300: Duplicate identifier 'bytesWritten'.
typings/main/ambient/node/index.d.ts(1238,9): error TS2300: Duplicate identifier 'port'.
typings/main/ambient/node/index.d.ts(1239,9): error TS2300: Duplicate identifier 'host'.
typings/main/ambient/node/index.d.ts(1240,9): error TS2300: Duplicate identifier 'backlog'.
typings/main/ambient/node/index.d.ts(1241,9): error TS2300: Duplicate identifier 'path'.
typings/main/ambient/node/index.d.ts(1242,9): error TS2300: Duplicate identifier 'exclusive'.
typings/main/ambient/node/index.d.ts(1260,9): error TS2300: Duplicate identifier 'maxConnections'.
typings/main/ambient/node/index.d.ts(1261,9): error TS2300: Duplicate identifier 'connections'.
typings/main/ambient/node/index.d.ts(1280,9): error TS2300: Duplicate identifier 'address'.
typings/main/ambient/node/index.d.ts(1281,9): error TS2300: Duplicate identifier 'port'.
typings/main/ambient/node/index.d.ts(1282,9): error TS2300: Duplicate identifier 'size'.
typings/main/ambient/node/index.d.ts(1286,9): error TS2300: Duplicate identifier 'address'.
typings/main/ambient/node/index.d.ts(1287,9): error TS2300: Duplicate identifier 'family'.
typings/main/ambient/node/index.d.ts(1288,9): error TS2300: Duplicate identifier 'port'.
typings/main/ambient/node/index.d.ts(1318,9): error TS2300: Duplicate identifier 'dev'.
typings/main/ambient/node/index.d.ts(1319,9): error TS2300: Duplicate identifier 'ino'.
typings/main/ambient/node/index.d.ts(1320,9): error TS2300: Duplicate identifier 'mode'.
typings/main/ambient/node/index.d.ts(1321,9): error TS2300: Duplicate identifier 'nlink'.
typings/main/ambient/node/index.d.ts(1322,9): error TS2300: Duplicate identifier 'uid'.
typings/main/ambient/node/index.d.ts(1323,9): error TS2300: Duplicate identifier 'gid'.
typings/main/ambient/node/index.d.ts(1324,9): error TS2300: Duplicate identifier 'rdev'.
typings/main/ambient/node/index.d.ts(1325,9): error TS2300: Duplicate identifier 'size'.
typings/main/ambient/node/index.d.ts(1326,9): error TS2300: Duplicate identifier 'blksize'.
typings/main/ambient/node/index.d.ts(1327,9): error TS2300: Duplicate identifier 'blocks'.
typings/main/ambient/node/index.d.ts(1328,9): error TS2300: Duplicate identifier 'atime'.
typings/main/ambient/node/index.d.ts(1329,9): error TS2300: Duplicate identifier 'mtime'.
typings/main/ambient/node/index.d.ts(1330,9): error TS2300: Duplicate identifier 'ctime'.
typings/main/ambient/node/index.d.ts(1331,9): error TS2300: Duplicate identifier 'birthtime'.
typings/main/ambient/node/index.d.ts(1343,9): error TS2300: Duplicate identifier 'bytesWritten'.
typings/main/ambient/node/index.d.ts(1597,9): error TS2300: Duplicate identifier 'root'.
typings/main/ambient/node/index.d.ts(1601,9): error TS2300: Duplicate identifier 'dir'.
typings/main/ambient/node/index.d.ts(1605,9): error TS2300: Duplicate identifier 'base'.
typings/main/ambient/node/index.d.ts(1609,9): error TS2300: Duplicate identifier 'ext'.
typings/main/ambient/node/index.d.ts(1613,9): error TS2300: Duplicate identifier 'name'.
typings/main/ambient/node/index.d.ts(1753,9): error TS2300: Duplicate identifier 'host'.
typings/main/ambient/node/index.d.ts(1754,9): error TS2300: Duplicate identifier 'port'.
typings/main/ambient/node/index.d.ts(1755,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/ambient/node/index.d.ts(1756,9): error TS2300: Duplicate identifier 'key'.
typings/main/ambient/node/index.d.ts(1757,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/ambient/node/index.d.ts(1758,9): error TS2300: Duplicate identifier 'cert'.
typings/main/ambient/node/index.d.ts(1759,9): error TS2300: Duplicate identifier 'ca'.
typings/main/ambient/node/index.d.ts(1760,9): error TS2300: Duplicate identifier 'crl'.
typings/main/ambient/node/index.d.ts(1761,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/ambient/node/index.d.ts(1762,9): error TS2300: Duplicate identifier 'honorCipherOrder'.
typings/main/ambient/node/index.d.ts(1763,9): error TS2300: Duplicate identifier 'requestCert'.
typings/main/ambient/node/index.d.ts(1764,9): error TS2300: Duplicate identifier 'rejectUnauthorized'.
typings/main/ambient/node/index.d.ts(1765,9): error TS2300: Duplicate identifier 'NPNProtocols'.
typings/main/ambient/node/index.d.ts(1766,9): error TS2300: Duplicate identifier 'SNICallback'.
typings/main/ambient/node/index.d.ts(1770,9): error TS2300: Duplicate identifier 'host'.
typings/main/ambient/node/index.d.ts(1771,9): error TS2300: Duplicate identifier 'port'.
typings/main/ambient/node/index.d.ts(1772,9): error TS2300: Duplicate identifier 'socket'.
typings/main/ambient/node/index.d.ts(1773,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/ambient/node/index.d.ts(1774,9): error TS2300: Duplicate identifier 'key'.
typings/main/ambient/node/index.d.ts(1775,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/ambient/node/index.d.ts(1776,9): error TS2300: Duplicate identifier 'cert'.
typings/main/ambient/node/index.d.ts(1777,9): error TS2300: Duplicate identifier 'ca'.
typings/main/ambient/node/index.d.ts(1778,9): error TS2300: Duplicate identifier 'rejectUnauthorized'.
typings/main/ambient/node/index.d.ts(1779,9): error TS2300: Duplicate identifier 'NPNProtocols'.
typings/main/ambient/node/index.d.ts(1780,9): error TS2300: Duplicate identifier 'servername'.
typings/main/ambient/node/index.d.ts(1791,9): error TS2300: Duplicate identifier 'maxConnections'.
typings/main/ambient/node/index.d.ts(1792,9): error TS2300: Duplicate identifier 'connections'.
typings/main/ambient/node/index.d.ts(1796,9): error TS2300: Duplicate identifier 'authorized'.
typings/main/ambient/node/index.d.ts(1797,9): error TS2300: Duplicate identifier 'authorizationError'.
typings/main/ambient/node/index.d.ts(1799,9): error TS2300: Duplicate identifier 'getCipher'.
typings/main/ambient/node/index.d.ts(1803,9): error TS2300: Duplicate identifier 'address'.
typings/main/ambient/node/index.d.ts(1808,9): error TS2300: Duplicate identifier 'remoteAddress'.
typings/main/ambient/node/index.d.ts(1809,9): error TS2300: Duplicate identifier 'remotePort'.
typings/main/ambient/node/index.d.ts(1813,9): error TS2300: Duplicate identifier 'encrypted'.
typings/main/ambient/node/index.d.ts(1814,9): error TS2300: Duplicate identifier 'cleartext'.
typings/main/ambient/node/index.d.ts(1818,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/ambient/node/index.d.ts(1819,9): error TS2300: Duplicate identifier 'key'.
typings/main/ambient/node/index.d.ts(1820,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/ambient/node/index.d.ts(1821,9): error TS2300: Duplicate identifier 'cert'.
typings/main/ambient/node/index.d.ts(1822,9): error TS2300: Duplicate identifier 'ca'.
typings/main/ambient/node/index.d.ts(1823,9): error TS2300: Duplicate identifier 'crl'.
typings/main/ambient/node/index.d.ts(1824,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/ambient/node/index.d.ts(1825,9): error TS2300: Duplicate identifier 'honorCipherOrder'.
typings/main/ambient/node/index.d.ts(1829,9): error TS2300: Duplicate identifier 'context'.
typings/main/ambient/node/index.d.ts(1842,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/ambient/node/index.d.ts(1843,9): error TS2300: Duplicate identifier 'key'.
typings/main/ambient/node/index.d.ts(1844,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/ambient/node/index.d.ts(1845,9): error TS2300: Duplicate identifier 'cert'.
typings/main/ambient/node/index.d.ts(1846,9): error TS2300: Duplicate identifier 'ca'.
typings/main/ambient/node/index.d.ts(1847,9): error TS2300: Duplicate identifier 'crl'.
typings/main/ambient/node/index.d.ts(1848,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/ambient/node/index.d.ts(1850,36): error TS2300: Duplicate identifier 'context'.
typings/main/ambient/node/index.d.ts(1923,9): error TS2300: Duplicate identifier 'key'.
typings/main/ambient/node/index.d.ts(1924,9): error TS2300: Duplicate identifier 'padding'.
typings/main/ambient/node/index.d.ts(1927,9): error TS2300: Duplicate identifier 'key'.
typings/main/ambient/node/index.d.ts(1928,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/ambient/node/index.d.ts(1929,9): error TS2300: Duplicate identifier 'padding'.
typings/main/ambient/node/index.d.ts(1938,18): error TS2300: Duplicate identifier 'Stream'.
typings/main/ambient/node/index.d.ts(1943,9): error TS2300: Duplicate identifier 'highWaterMark'.
typings/main/ambient/node/index.d.ts(1944,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/ambient/node/index.d.ts(1945,9): error TS2300: Duplicate identifier 'objectMode'.
typings/main/ambient/node/index.d.ts(1948,18): error TS2300: Duplicate identifier 'Readable'.
typings/main/ambient/node/index.d.ts(1964,9): error TS2300: Duplicate identifier 'highWaterMark'.
typings/main/ambient/node/index.d.ts(1965,9): error TS2300: Duplicate identifier 'decodeStrings'.
typings/main/ambient/node/index.d.ts(1966,9): error TS2300: Duplicate identifier 'objectMode'.
typings/main/ambient/node/index.d.ts(1969,18): error TS2300: Duplicate identifier 'Writable'.
typings/main/ambient/node/index.d.ts(1981,9): error TS2300: Duplicate identifier 'allowHalfOpen'.
typings/main/ambient/node/index.d.ts(1985,18): error TS2300: Duplicate identifier 'Duplex'.
typings/main/ambient/node/index.d.ts(1999,18): error TS2300: Duplicate identifier 'Transform'.
typings/main/ambient/node/index.d.ts(2021,18): error TS2300: Duplicate identifier 'PassThrough'.
typings/main/ambient/node/index.d.ts(2026,9): error TS2300: Duplicate identifier 'showHidden'.
typings/main/ambient/node/index.d.ts(2027,9): error TS2300: Duplicate identifier 'depth'.
typings/main/ambient/node/index.d.ts(2028,9): error TS2300: Duplicate identifier 'colors'.
typings/main/ambient/node/index.d.ts(2029,9): error TS2300: Duplicate identifier 'customInspect'.
typings/main/ambient/node/index.d.ts(2098,9): error TS2300: Duplicate identifier 'isRaw'.
typings/main/ambient/node/index.d.ts(2100,9): error TS2300: Duplicate identifier 'isTTY'.
typings/main/ambient/node/index.d.ts(2103,9): error TS2300: Duplicate identifier 'columns'.
typings/main/ambient/node/index.d.ts(2104,9): error TS2300: Duplicate identifier 'rows'.
typings/main/ambient/node/index.d.ts(2105,9): error TS2300: Duplicate identifier 'isTTY'.
typings/main/ambient/node/index.d.ts(2112,18): error TS2300: Duplicate identifier 'Domain'.
typings/main/definitions/node/index.d.ts(456,9): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(457,9): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(458,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
typings/main/definitions/node/index.d.ts(458,26): error TS2300: Duplicate identifier 'Buffer'.
typings/main/definitions/node/index.d.ts(458,50): error TS2300: Duplicate identifier 'SlowBuffer'.
typings/main/definitions/node/index.d.ts(463,9): error TS2300: Duplicate identifier 'encodeURIComponent'.
typings/main/definitions/node/index.d.ts(467,9): error TS2300: Duplicate identifier 'maxKeys'.
typings/main/definitions/node/index.d.ts(468,9): error TS2300: Duplicate identifier 'decodeURIComponent'.
typings/main/definitions/node/index.d.ts(479,18): error TS2300: Duplicate identifier 'EventEmitter'.
typings/main/definitions/node/index.d.ts(479,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(498,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(499,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(500,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(503,9): error TS2300: Duplicate identifier 'protocol'.
typings/main/definitions/node/index.d.ts(504,9): error TS2300: Duplicate identifier 'host'.
typings/main/definitions/node/index.d.ts(505,9): error TS2300: Duplicate identifier 'hostname'.
typings/main/definitions/node/index.d.ts(506,9): error TS2300: Duplicate identifier 'family'.
typings/main/definitions/node/index.d.ts(507,9): error TS2300: Duplicate identifier 'port'.
typings/main/definitions/node/index.d.ts(508,9): error TS2300: Duplicate identifier 'localAddress'.
typings/main/definitions/node/index.d.ts(509,9): error TS2300: Duplicate identifier 'socketPath'.
typings/main/definitions/node/index.d.ts(510,9): error TS2300: Duplicate identifier 'method'.
typings/main/definitions/node/index.d.ts(511,9): error TS2300: Duplicate identifier 'path'.
typings/main/definitions/node/index.d.ts(512,9): error TS2300: Duplicate identifier 'headers'.
typings/main/definitions/node/index.d.ts(513,9): error TS2300: Duplicate identifier 'auth'.
typings/main/definitions/node/index.d.ts(514,9): error TS2300: Duplicate identifier 'agent'.
typings/main/definitions/node/index.d.ts(519,9): error TS2300: Duplicate identifier 'maxHeadersCount'.
typings/main/definitions/node/index.d.ts(520,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/definitions/node/index.d.ts(526,9): error TS2300: Duplicate identifier 'connection'.
typings/main/definitions/node/index.d.ts(539,9): error TS2300: Duplicate identifier 'statusCode'.
typings/main/definitions/node/index.d.ts(540,9): error TS2300: Duplicate identifier 'statusMessage'.
typings/main/definitions/node/index.d.ts(541,9): error TS2300: Duplicate identifier 'headersSent'.
typings/main/definitions/node/index.d.ts(543,9): error TS2300: Duplicate identifier 'sendDate'.
typings/main/definitions/node/index.d.ts(583,9): error TS2300: Duplicate identifier 'httpVersion'.
typings/main/definitions/node/index.d.ts(584,9): error TS2300: Duplicate identifier 'headers'.
typings/main/definitions/node/index.d.ts(585,9): error TS2300: Duplicate identifier 'rawHeaders'.
typings/main/definitions/node/index.d.ts(586,9): error TS2300: Duplicate identifier 'trailers'.
typings/main/definitions/node/index.d.ts(587,9): error TS2300: Duplicate identifier 'rawTrailers'.
typings/main/definitions/node/index.d.ts(592,9): error TS2300: Duplicate identifier 'method'.
typings/main/definitions/node/index.d.ts(596,9): error TS2300: Duplicate identifier 'url'.
typings/main/definitions/node/index.d.ts(600,9): error TS2300: Duplicate identifier 'statusCode'.
typings/main/definitions/node/index.d.ts(604,9): error TS2300: Duplicate identifier 'statusMessage'.
typings/main/definitions/node/index.d.ts(605,9): error TS2300: Duplicate identifier 'socket'.
typings/main/definitions/node/index.d.ts(616,9): error TS2300: Duplicate identifier 'keepAlive'.
typings/main/definitions/node/index.d.ts(621,9): error TS2300: Duplicate identifier 'keepAliveMsecs'.
typings/main/definitions/node/index.d.ts(625,9): error TS2300: Duplicate identifier 'maxSockets'.
typings/main/definitions/node/index.d.ts(629,9): error TS2300: Duplicate identifier 'maxFreeSockets'.
typings/main/definitions/node/index.d.ts(632,18): error TS2300: Duplicate identifier 'Agent'.
typings/main/definitions/node/index.d.ts(632,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(662,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(663,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(666,9): error TS2300: Duplicate identifier 'exec'.
typings/main/definitions/node/index.d.ts(667,9): error TS2300: Duplicate identifier 'args'.
typings/main/definitions/node/index.d.ts(668,9): error TS2300: Duplicate identifier 'silent'.
typings/main/definitions/node/index.d.ts(672,9): error TS2300: Duplicate identifier 'address'.
typings/main/definitions/node/index.d.ts(673,9): error TS2300: Duplicate identifier 'port'.
typings/main/definitions/node/index.d.ts(674,9): error TS2300: Duplicate identifier 'addressType'.
typings/main/definitions/node/index.d.ts(677,18): error TS2300: Duplicate identifier 'Worker'.
typings/main/definitions/node/index.d.ts(677,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(719,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(720,36): error TS2300: Duplicate identifier 'chunkSize'.
typings/main/definitions/node/index.d.ts(720,56): error TS2300: Duplicate identifier 'windowBits'.
typings/main/definitions/node/index.d.ts(720,77): error TS2300: Duplicate identifier 'level'.
typings/main/definitions/node/index.d.ts(720,93): error TS2300: Duplicate identifier 'memLevel'.
typings/main/definitions/node/index.d.ts(720,112): error TS2300: Duplicate identifier 'strategy'.
typings/main/definitions/node/index.d.ts(720,131): error TS2300: Duplicate identifier 'dictionary'.
typings/main/definitions/node/index.d.ts(789,9): error TS2300: Duplicate identifier 'model'.
typings/main/definitions/node/index.d.ts(790,9): error TS2300: Duplicate identifier 'speed'.
typings/main/definitions/node/index.d.ts(791,9): error TS2300: Duplicate identifier 'times'.
typings/main/definitions/node/index.d.ts(801,9): error TS2300: Duplicate identifier 'address'.
typings/main/definitions/node/index.d.ts(802,9): error TS2300: Duplicate identifier 'netmask'.
typings/main/definitions/node/index.d.ts(803,9): error TS2300: Duplicate identifier 'family'.
typings/main/definitions/node/index.d.ts(804,9): error TS2300: Duplicate identifier 'mac'.
typings/main/definitions/node/index.d.ts(805,9): error TS2300: Duplicate identifier 'internal'.
typings/main/definitions/node/index.d.ts(826,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(827,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(828,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(831,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/definitions/node/index.d.ts(832,9): error TS2300: Duplicate identifier 'key'.
typings/main/definitions/node/index.d.ts(833,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/definitions/node/index.d.ts(834,9): error TS2300: Duplicate identifier 'cert'.
typings/main/definitions/node/index.d.ts(835,9): error TS2300: Duplicate identifier 'ca'.
typings/main/definitions/node/index.d.ts(836,9): error TS2300: Duplicate identifier 'crl'.
typings/main/definitions/node/index.d.ts(837,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/definitions/node/index.d.ts(838,9): error TS2300: Duplicate identifier 'honorCipherOrder'.
typings/main/definitions/node/index.d.ts(839,9): error TS2300: Duplicate identifier 'requestCert'.
typings/main/definitions/node/index.d.ts(840,9): error TS2300: Duplicate identifier 'rejectUnauthorized'.
typings/main/definitions/node/index.d.ts(841,9): error TS2300: Duplicate identifier 'NPNProtocols'.
typings/main/definitions/node/index.d.ts(842,9): error TS2300: Duplicate identifier 'SNICallback'.
typings/main/definitions/node/index.d.ts(846,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/definitions/node/index.d.ts(847,9): error TS2300: Duplicate identifier 'key'.
typings/main/definitions/node/index.d.ts(848,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/definitions/node/index.d.ts(849,9): error TS2300: Duplicate identifier 'cert'.
typings/main/definitions/node/index.d.ts(850,9): error TS2300: Duplicate identifier 'ca'.
typings/main/definitions/node/index.d.ts(851,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/definitions/node/index.d.ts(852,9): error TS2300: Duplicate identifier 'rejectUnauthorized'.
typings/main/definitions/node/index.d.ts(853,9): error TS2300: Duplicate identifier 'secureProtocol'.
typings/main/definitions/node/index.d.ts(857,9): error TS2300: Duplicate identifier 'maxSockets'.
typings/main/definitions/node/index.d.ts(858,9): error TS2300: Duplicate identifier 'sockets'.
typings/main/definitions/node/index.d.ts(859,9): error TS2300: Duplicate identifier 'requests'.
typings/main/definitions/node/index.d.ts(885,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(886,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(889,9): error TS2300: Duplicate identifier 'prompt'.
typings/main/definitions/node/index.d.ts(890,9): error TS2300: Duplicate identifier 'input'.
typings/main/definitions/node/index.d.ts(891,9): error TS2300: Duplicate identifier 'output'.
typings/main/definitions/node/index.d.ts(892,9): error TS2300: Duplicate identifier 'terminal'.
typings/main/definitions/node/index.d.ts(893,9): error TS2300: Duplicate identifier 'eval'.
typings/main/definitions/node/index.d.ts(894,9): error TS2300: Duplicate identifier 'useColors'.
typings/main/definitions/node/index.d.ts(895,9): error TS2300: Duplicate identifier 'useGlobal'.
typings/main/definitions/node/index.d.ts(896,9): error TS2300: Duplicate identifier 'ignoreUndefined'.
typings/main/definitions/node/index.d.ts(897,9): error TS2300: Duplicate identifier 'writer'.
typings/main/definitions/node/index.d.ts(903,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(904,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(907,9): error TS2300: Duplicate identifier 'sequence'.
typings/main/definitions/node/index.d.ts(908,9): error TS2300: Duplicate identifier 'name'.
typings/main/definitions/node/index.d.ts(909,9): error TS2300: Duplicate identifier 'ctrl'.
typings/main/definitions/node/index.d.ts(910,9): error TS2300: Duplicate identifier 'meta'.
typings/main/definitions/node/index.d.ts(911,9): error TS2300: Duplicate identifier 'shift'.
typings/main/definitions/node/index.d.ts(930,9): error TS2300: Duplicate identifier 'completions'.
typings/main/definitions/node/index.d.ts(931,9): error TS2300: Duplicate identifier 'line'.
typings/main/definitions/node/index.d.ts(935,9): error TS2300: Duplicate identifier 'input'.
typings/main/definitions/node/index.d.ts(936,9): error TS2300: Duplicate identifier 'output'.
typings/main/definitions/node/index.d.ts(937,9): error TS2300: Duplicate identifier 'completer'.
typings/main/definitions/node/index.d.ts(938,9): error TS2300: Duplicate identifier 'terminal'.
typings/main/definitions/node/index.d.ts(939,9): error TS2300: Duplicate identifier 'historySize'.
typings/main/definitions/node/index.d.ts(954,9): error TS2300: Duplicate identifier 'filename'.
typings/main/definitions/node/index.d.ts(955,9): error TS2300: Duplicate identifier 'lineOffset'.
typings/main/definitions/node/index.d.ts(956,9): error TS2300: Duplicate identifier 'columnOffset'.
typings/main/definitions/node/index.d.ts(957,9): error TS2300: Duplicate identifier 'displayErrors'.
typings/main/definitions/node/index.d.ts(958,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/definitions/node/index.d.ts(959,9): error TS2300: Duplicate identifier 'cachedData'.
typings/main/definitions/node/index.d.ts(960,9): error TS2300: Duplicate identifier 'produceCachedData'.
typings/main/definitions/node/index.d.ts(963,9): error TS2300: Duplicate identifier 'filename'.
typings/main/definitions/node/index.d.ts(964,9): error TS2300: Duplicate identifier 'lineOffset'.
typings/main/definitions/node/index.d.ts(965,9): error TS2300: Duplicate identifier 'columnOffset'.
typings/main/definitions/node/index.d.ts(966,9): error TS2300: Duplicate identifier 'displayErrors'.
typings/main/definitions/node/index.d.ts(967,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/definitions/node/index.d.ts(969,18): error TS2300: Duplicate identifier 'Script'.
typings/main/definitions/node/index.d.ts(969,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(984,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(985,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(988,9): error TS2300: Duplicate identifier 'stdin'.
typings/main/definitions/node/index.d.ts(989,9): error TS2300: Duplicate identifier 'stdout'.
typings/main/definitions/node/index.d.ts(990,9): error TS2300: Duplicate identifier 'stderr'.
typings/main/definitions/node/index.d.ts(991,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/definitions/node/index.d.ts(992,9): error TS2300: Duplicate identifier 'pid'.
typings/main/definitions/node/index.d.ts(1000,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/definitions/node/index.d.ts(1001,9): error TS2300: Duplicate identifier 'env'.
typings/main/definitions/node/index.d.ts(1002,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/definitions/node/index.d.ts(1003,9): error TS2300: Duplicate identifier 'detached'.
typings/main/definitions/node/index.d.ts(1004,9): error TS2300: Duplicate identifier 'uid'.
typings/main/definitions/node/index.d.ts(1005,9): error TS2300: Duplicate identifier 'gid'.
typings/main/definitions/node/index.d.ts(1006,9): error TS2300: Duplicate identifier 'shell'.
typings/main/definitions/node/index.d.ts(1011,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/definitions/node/index.d.ts(1012,9): error TS2300: Duplicate identifier 'env'.
typings/main/definitions/node/index.d.ts(1013,9): error TS2300: Duplicate identifier 'shell'.
typings/main/definitions/node/index.d.ts(1014,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/definitions/node/index.d.ts(1015,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/definitions/node/index.d.ts(1016,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/definitions/node/index.d.ts(1017,9): error TS2300: Duplicate identifier 'uid'.
typings/main/definitions/node/index.d.ts(1018,9): error TS2300: Duplicate identifier 'gid'.
typings/main/definitions/node/index.d.ts(1021,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1024,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1033,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/definitions/node/index.d.ts(1034,9): error TS2300: Duplicate identifier 'env'.
typings/main/definitions/node/index.d.ts(1035,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/definitions/node/index.d.ts(1036,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/definitions/node/index.d.ts(1037,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/definitions/node/index.d.ts(1038,9): error TS2300: Duplicate identifier 'uid'.
typings/main/definitions/node/index.d.ts(1039,9): error TS2300: Duplicate identifier 'gid'.
typings/main/definitions/node/index.d.ts(1042,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1045,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1059,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/definitions/node/index.d.ts(1060,9): error TS2300: Duplicate identifier 'env'.
typings/main/definitions/node/index.d.ts(1061,9): error TS2300: Duplicate identifier 'execPath'.
typings/main/definitions/node/index.d.ts(1062,9): error TS2300: Duplicate identifier 'execArgv'.
typings/main/definitions/node/index.d.ts(1063,9): error TS2300: Duplicate identifier 'silent'.
typings/main/definitions/node/index.d.ts(1064,9): error TS2300: Duplicate identifier 'uid'.
typings/main/definitions/node/index.d.ts(1065,9): error TS2300: Duplicate identifier 'gid'.
typings/main/definitions/node/index.d.ts(1070,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/definitions/node/index.d.ts(1071,9): error TS2300: Duplicate identifier 'input'.
typings/main/definitions/node/index.d.ts(1072,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/definitions/node/index.d.ts(1073,9): error TS2300: Duplicate identifier 'env'.
typings/main/definitions/node/index.d.ts(1074,9): error TS2300: Duplicate identifier 'uid'.
typings/main/definitions/node/index.d.ts(1075,9): error TS2300: Duplicate identifier 'gid'.
typings/main/definitions/node/index.d.ts(1076,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/definitions/node/index.d.ts(1077,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/definitions/node/index.d.ts(1078,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/definitions/node/index.d.ts(1079,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1080,9): error TS2300: Duplicate identifier 'shell'.
typings/main/definitions/node/index.d.ts(1083,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1086,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1089,9): error TS2300: Duplicate identifier 'pid'.
typings/main/definitions/node/index.d.ts(1090,9): error TS2300: Duplicate identifier 'output'.
typings/main/definitions/node/index.d.ts(1091,9): error TS2300: Duplicate identifier 'stdout'.
typings/main/definitions/node/index.d.ts(1092,9): error TS2300: Duplicate identifier 'stderr'.
typings/main/definitions/node/index.d.ts(1093,9): error TS2300: Duplicate identifier 'status'.
typings/main/definitions/node/index.d.ts(1094,9): error TS2300: Duplicate identifier 'signal'.
typings/main/definitions/node/index.d.ts(1095,9): error TS2300: Duplicate identifier 'error'.
typings/main/definitions/node/index.d.ts(1106,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/definitions/node/index.d.ts(1107,9): error TS2300: Duplicate identifier 'input'.
typings/main/definitions/node/index.d.ts(1108,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/definitions/node/index.d.ts(1109,9): error TS2300: Duplicate identifier 'env'.
typings/main/definitions/node/index.d.ts(1110,9): error TS2300: Duplicate identifier 'shell'.
typings/main/definitions/node/index.d.ts(1111,9): error TS2300: Duplicate identifier 'uid'.
typings/main/definitions/node/index.d.ts(1112,9): error TS2300: Duplicate identifier 'gid'.
typings/main/definitions/node/index.d.ts(1113,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/definitions/node/index.d.ts(1114,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/definitions/node/index.d.ts(1115,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/definitions/node/index.d.ts(1116,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1119,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1122,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1130,9): error TS2300: Duplicate identifier 'cwd'.
typings/main/definitions/node/index.d.ts(1131,9): error TS2300: Duplicate identifier 'input'.
typings/main/definitions/node/index.d.ts(1132,9): error TS2300: Duplicate identifier 'stdio'.
typings/main/definitions/node/index.d.ts(1133,9): error TS2300: Duplicate identifier 'env'.
typings/main/definitions/node/index.d.ts(1134,9): error TS2300: Duplicate identifier 'uid'.
typings/main/definitions/node/index.d.ts(1135,9): error TS2300: Duplicate identifier 'gid'.
typings/main/definitions/node/index.d.ts(1136,9): error TS2300: Duplicate identifier 'timeout'.
typings/main/definitions/node/index.d.ts(1137,9): error TS2300: Duplicate identifier 'killSignal'.
typings/main/definitions/node/index.d.ts(1138,9): error TS2300: Duplicate identifier 'maxBuffer'.
typings/main/definitions/node/index.d.ts(1139,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1142,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1145,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1158,9): error TS2300: Duplicate identifier 'href'.
typings/main/definitions/node/index.d.ts(1159,9): error TS2300: Duplicate identifier 'protocol'.
typings/main/definitions/node/index.d.ts(1160,9): error TS2300: Duplicate identifier 'auth'.
typings/main/definitions/node/index.d.ts(1161,9): error TS2300: Duplicate identifier 'hostname'.
typings/main/definitions/node/index.d.ts(1162,9): error TS2300: Duplicate identifier 'port'.
typings/main/definitions/node/index.d.ts(1163,9): error TS2300: Duplicate identifier 'host'.
typings/main/definitions/node/index.d.ts(1164,9): error TS2300: Duplicate identifier 'pathname'.
typings/main/definitions/node/index.d.ts(1165,9): error TS2300: Duplicate identifier 'search'.
typings/main/definitions/node/index.d.ts(1166,9): error TS2300: Duplicate identifier 'query'.
typings/main/definitions/node/index.d.ts(1167,9): error TS2300: Duplicate identifier 'slashes'.
typings/main/definitions/node/index.d.ts(1168,9): error TS2300: Duplicate identifier 'hash'.
typings/main/definitions/node/index.d.ts(1169,9): error TS2300: Duplicate identifier 'path'.
typings/main/definitions/node/index.d.ts(1193,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(1205,9): error TS2300: Duplicate identifier 'bufferSize'.
typings/main/definitions/node/index.d.ts(1218,9): error TS2300: Duplicate identifier 'remoteAddress'.
typings/main/definitions/node/index.d.ts(1219,9): error TS2300: Duplicate identifier 'remoteFamily'.
typings/main/definitions/node/index.d.ts(1220,9): error TS2300: Duplicate identifier 'remotePort'.
typings/main/definitions/node/index.d.ts(1221,9): error TS2300: Duplicate identifier 'localAddress'.
typings/main/definitions/node/index.d.ts(1222,9): error TS2300: Duplicate identifier 'localPort'.
typings/main/definitions/node/index.d.ts(1223,9): error TS2300: Duplicate identifier 'bytesRead'.
typings/main/definitions/node/index.d.ts(1224,9): error TS2300: Duplicate identifier 'bytesWritten'.
typings/main/definitions/node/index.d.ts(1239,9): error TS2300: Duplicate identifier 'port'.
typings/main/definitions/node/index.d.ts(1240,9): error TS2300: Duplicate identifier 'host'.
typings/main/definitions/node/index.d.ts(1241,9): error TS2300: Duplicate identifier 'backlog'.
typings/main/definitions/node/index.d.ts(1242,9): error TS2300: Duplicate identifier 'path'.
typings/main/definitions/node/index.d.ts(1243,9): error TS2300: Duplicate identifier 'exclusive'.
typings/main/definitions/node/index.d.ts(1261,9): error TS2300: Duplicate identifier 'maxConnections'.
typings/main/definitions/node/index.d.ts(1262,9): error TS2300: Duplicate identifier 'connections'.
typings/main/definitions/node/index.d.ts(1278,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(1281,9): error TS2300: Duplicate identifier 'address'.
typings/main/definitions/node/index.d.ts(1282,9): error TS2300: Duplicate identifier 'port'.
typings/main/definitions/node/index.d.ts(1283,9): error TS2300: Duplicate identifier 'size'.
typings/main/definitions/node/index.d.ts(1287,9): error TS2300: Duplicate identifier 'address'.
typings/main/definitions/node/index.d.ts(1288,9): error TS2300: Duplicate identifier 'family'.
typings/main/definitions/node/index.d.ts(1289,9): error TS2300: Duplicate identifier 'port'.
typings/main/definitions/node/index.d.ts(1308,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(1309,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(1319,9): error TS2300: Duplicate identifier 'dev'.
typings/main/definitions/node/index.d.ts(1320,9): error TS2300: Duplicate identifier 'ino'.
typings/main/definitions/node/index.d.ts(1321,9): error TS2300: Duplicate identifier 'mode'.
typings/main/definitions/node/index.d.ts(1322,9): error TS2300: Duplicate identifier 'nlink'.
typings/main/definitions/node/index.d.ts(1323,9): error TS2300: Duplicate identifier 'uid'.
typings/main/definitions/node/index.d.ts(1324,9): error TS2300: Duplicate identifier 'gid'.
typings/main/definitions/node/index.d.ts(1325,9): error TS2300: Duplicate identifier 'rdev'.
typings/main/definitions/node/index.d.ts(1326,9): error TS2300: Duplicate identifier 'size'.
typings/main/definitions/node/index.d.ts(1327,9): error TS2300: Duplicate identifier 'blksize'.
typings/main/definitions/node/index.d.ts(1328,9): error TS2300: Duplicate identifier 'blocks'.
typings/main/definitions/node/index.d.ts(1329,9): error TS2300: Duplicate identifier 'atime'.
typings/main/definitions/node/index.d.ts(1330,9): error TS2300: Duplicate identifier 'mtime'.
typings/main/definitions/node/index.d.ts(1331,9): error TS2300: Duplicate identifier 'ctime'.
typings/main/definitions/node/index.d.ts(1332,9): error TS2300: Duplicate identifier 'birthtime'.
typings/main/definitions/node/index.d.ts(1344,9): error TS2300: Duplicate identifier 'bytesWritten'.
typings/main/definitions/node/index.d.ts(1598,9): error TS2300: Duplicate identifier 'root'.
typings/main/definitions/node/index.d.ts(1602,9): error TS2300: Duplicate identifier 'dir'.
typings/main/definitions/node/index.d.ts(1606,9): error TS2300: Duplicate identifier 'base'.
typings/main/definitions/node/index.d.ts(1610,9): error TS2300: Duplicate identifier 'ext'.
typings/main/definitions/node/index.d.ts(1614,9): error TS2300: Duplicate identifier 'name'.
typings/main/definitions/node/index.d.ts(1746,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(1747,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(1748,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(1754,9): error TS2300: Duplicate identifier 'host'.
typings/main/definitions/node/index.d.ts(1755,9): error TS2300: Duplicate identifier 'port'.
typings/main/definitions/node/index.d.ts(1756,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/definitions/node/index.d.ts(1757,9): error TS2300: Duplicate identifier 'key'.
typings/main/definitions/node/index.d.ts(1758,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/definitions/node/index.d.ts(1759,9): error TS2300: Duplicate identifier 'cert'.
typings/main/definitions/node/index.d.ts(1760,9): error TS2300: Duplicate identifier 'ca'.
typings/main/definitions/node/index.d.ts(1761,9): error TS2300: Duplicate identifier 'crl'.
typings/main/definitions/node/index.d.ts(1762,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/definitions/node/index.d.ts(1763,9): error TS2300: Duplicate identifier 'honorCipherOrder'.
typings/main/definitions/node/index.d.ts(1764,9): error TS2300: Duplicate identifier 'requestCert'.
typings/main/definitions/node/index.d.ts(1765,9): error TS2300: Duplicate identifier 'rejectUnauthorized'.
typings/main/definitions/node/index.d.ts(1766,9): error TS2300: Duplicate identifier 'NPNProtocols'.
typings/main/definitions/node/index.d.ts(1767,9): error TS2300: Duplicate identifier 'SNICallback'.
typings/main/definitions/node/index.d.ts(1771,9): error TS2300: Duplicate identifier 'host'.
typings/main/definitions/node/index.d.ts(1772,9): error TS2300: Duplicate identifier 'port'.
typings/main/definitions/node/index.d.ts(1773,9): error TS2300: Duplicate identifier 'socket'.
typings/main/definitions/node/index.d.ts(1774,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/definitions/node/index.d.ts(1775,9): error TS2300: Duplicate identifier 'key'.
typings/main/definitions/node/index.d.ts(1776,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/definitions/node/index.d.ts(1777,9): error TS2300: Duplicate identifier 'cert'.
typings/main/definitions/node/index.d.ts(1778,9): error TS2300: Duplicate identifier 'ca'.
typings/main/definitions/node/index.d.ts(1779,9): error TS2300: Duplicate identifier 'rejectUnauthorized'.
typings/main/definitions/node/index.d.ts(1780,9): error TS2300: Duplicate identifier 'NPNProtocols'.
typings/main/definitions/node/index.d.ts(1781,9): error TS2300: Duplicate identifier 'servername'.
typings/main/definitions/node/index.d.ts(1792,9): error TS2300: Duplicate identifier 'maxConnections'.
typings/main/definitions/node/index.d.ts(1793,9): error TS2300: Duplicate identifier 'connections'.
typings/main/definitions/node/index.d.ts(1797,9): error TS2300: Duplicate identifier 'authorized'.
typings/main/definitions/node/index.d.ts(1798,9): error TS2300: Duplicate identifier 'authorizationError'.
typings/main/definitions/node/index.d.ts(1800,9): error TS2300: Duplicate identifier 'getCipher'.
typings/main/definitions/node/index.d.ts(1804,9): error TS2300: Duplicate identifier 'address'.
typings/main/definitions/node/index.d.ts(1809,9): error TS2300: Duplicate identifier 'remoteAddress'.
typings/main/definitions/node/index.d.ts(1810,9): error TS2300: Duplicate identifier 'remotePort'.
typings/main/definitions/node/index.d.ts(1814,9): error TS2300: Duplicate identifier 'encrypted'.
typings/main/definitions/node/index.d.ts(1815,9): error TS2300: Duplicate identifier 'cleartext'.
typings/main/definitions/node/index.d.ts(1819,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/definitions/node/index.d.ts(1820,9): error TS2300: Duplicate identifier 'key'.
typings/main/definitions/node/index.d.ts(1821,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/definitions/node/index.d.ts(1822,9): error TS2300: Duplicate identifier 'cert'.
typings/main/definitions/node/index.d.ts(1823,9): error TS2300: Duplicate identifier 'ca'.
typings/main/definitions/node/index.d.ts(1824,9): error TS2300: Duplicate identifier 'crl'.
typings/main/definitions/node/index.d.ts(1825,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/definitions/node/index.d.ts(1826,9): error TS2300: Duplicate identifier 'honorCipherOrder'.
typings/main/definitions/node/index.d.ts(1830,9): error TS2300: Duplicate identifier 'context'.
typings/main/definitions/node/index.d.ts(1843,9): error TS2300: Duplicate identifier 'pfx'.
typings/main/definitions/node/index.d.ts(1844,9): error TS2300: Duplicate identifier 'key'.
typings/main/definitions/node/index.d.ts(1845,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/definitions/node/index.d.ts(1846,9): error TS2300: Duplicate identifier 'cert'.
typings/main/definitions/node/index.d.ts(1847,9): error TS2300: Duplicate identifier 'ca'.
typings/main/definitions/node/index.d.ts(1848,9): error TS2300: Duplicate identifier 'crl'.
typings/main/definitions/node/index.d.ts(1849,9): error TS2300: Duplicate identifier 'ciphers'.
typings/main/definitions/node/index.d.ts(1851,36): error TS2300: Duplicate identifier 'context'.
typings/main/definitions/node/index.d.ts(1924,9): error TS2300: Duplicate identifier 'key'.
typings/main/definitions/node/index.d.ts(1925,9): error TS2300: Duplicate identifier 'padding'.
typings/main/definitions/node/index.d.ts(1928,9): error TS2300: Duplicate identifier 'key'.
typings/main/definitions/node/index.d.ts(1929,9): error TS2300: Duplicate identifier 'passphrase'.
typings/main/definitions/node/index.d.ts(1930,9): error TS2300: Duplicate identifier 'padding'.
typings/main/definitions/node/index.d.ts(1937,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(1939,18): error TS2300: Duplicate identifier 'Stream'.
typings/main/definitions/node/index.d.ts(1939,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(1944,9): error TS2300: Duplicate identifier 'highWaterMark'.
typings/main/definitions/node/index.d.ts(1945,9): error TS2300: Duplicate identifier 'encoding'.
typings/main/definitions/node/index.d.ts(1946,9): error TS2300: Duplicate identifier 'objectMode'.
typings/main/definitions/node/index.d.ts(1949,18): error TS2300: Duplicate identifier 'Readable'.
typings/main/definitions/node/index.d.ts(1949,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(1965,9): error TS2300: Duplicate identifier 'highWaterMark'.
typings/main/definitions/node/index.d.ts(1966,9): error TS2300: Duplicate identifier 'decodeStrings'.
typings/main/definitions/node/index.d.ts(1967,9): error TS2300: Duplicate identifier 'objectMode'.
typings/main/definitions/node/index.d.ts(1970,18): error TS2300: Duplicate identifier 'Writable'.
typings/main/definitions/node/index.d.ts(1970,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(1982,9): error TS2300: Duplicate identifier 'allowHalfOpen'.
typings/main/definitions/node/index.d.ts(1986,18): error TS2300: Duplicate identifier 'Duplex'.
typings/main/definitions/node/index.d.ts(1986,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(2000,18): error TS2300: Duplicate identifier 'Transform'.
typings/main/definitions/node/index.d.ts(2000,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(2022,18): error TS2300: Duplicate identifier 'PassThrough'.
typings/main/definitions/node/index.d.ts(2022,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(2027,9): error TS2300: Duplicate identifier 'showHidden'.
typings/main/definitions/node/index.d.ts(2028,9): error TS2300: Duplicate identifier 'depth'.
typings/main/definitions/node/index.d.ts(2029,9): error TS2300: Duplicate identifier 'colors'.
typings/main/definitions/node/index.d.ts(2030,9): error TS2300: Duplicate identifier 'customInspect'.
typings/main/definitions/node/index.d.ts(2050,14): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(2051,15): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/node/index.d.ts(2091,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
typings/main/definitions/node/index.d.ts(2095,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(2099,9): error TS2300: Duplicate identifier 'isRaw'.
typings/main/definitions/node/index.d.ts(2101,9): error TS2300: Duplicate identifier 'isTTY'.
typings/main/definitions/node/index.d.ts(2104,9): error TS2300: Duplicate identifier 'columns'.
typings/main/definitions/node/index.d.ts(2105,9): error TS2300: Duplicate identifier 'rows'.
typings/main/definitions/node/index.d.ts(2106,9): error TS2300: Duplicate identifier 'isTTY'.
typings/main/definitions/node/index.d.ts(2111,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
typings/main/definitions/node/index.d.ts(2113,18): error TS2300: Duplicate identifier 'Domain'.
typings/main/definitions/node/index.d.ts(2113,18): error TS2665: Module augmentation cannot introduce new names in the top level scope.
typings/main/definitions/require/index.d.ts(35,8): error TS2664: Invalid module name in augmentation, module 'module' cannot be found.

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

Fixing typescript error: TS2304: Cannot find name ‘require’

If you try to use “require” in a typescript file, you can get this error:

 TS2304: Cannot find name 'require'

Most likely, the best solution is for you to switch to using imports. For instance, instead of this:

let _ = require('lodash');

Do this:

import { map, groupBy, flatMap, keys, filter, find } from "lodash";

While this takes some time to convert, you get the advantage of much smaller Javascript files when bundled, because your tooling (e.g. webpack) will remove functions you aren’t using.

For reference, this is what I had to run on the command line to get this to work:

typings init
typings install 'dt!lodash'

And add a reference in my .ts file:

/// <reference path="typings/main.d.ts" />

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.

Fixing Typescript error: TS2666: Exports and export assignments are not permitted in module augmentations

When I set up typings to run with typescript, I got stuck for a while trying to get imports from external libraries to work, with this error:

typings/main/definitions/react/index.d.ts(2322,5): error TS2666: Exports and export assignments are not permitted in module augmentations.

This happens, for instance, trying to use React:

import * as React from 'react';
 
interface IMessage {
  msg: String;
}
 
class TestApp extends React.Component<IMessage, {}> {
  public render(): Element {
    return <div>test</div>;
  }
}

The reason for this is you need use a special incantation to install libraries:

typings install react --ambient --save

In order for this to work without weird reference comments in the file, you also need a tsconfig.json:

{
    "compilerOptions": {
    "module": "commonjs",
    "target": "es5",
    "jsx": "react",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "outDir": "dist"
    },
    "exclude": [
        "node_modules",
    "dist",
    "node_modules",
    "typings"
    ],
    "files": [
      "./app/index.tsx",
      "./typings/main.d.ts"
    ]
}

If you want a good Javascript book, I got a lot out of Secrets of the Javascript Ninja.