How to fix tsc throwing errors for node typings?

Viewed 1436

I have started a new node project using typescript.

I installed typescript via:

$ npm install typescript@2 -g

My enviornment looks like this:

$ tsc -v
Version 2.0.0

$ node -v
v7.10.0

I installed the typings for node via:

npm install --save @types/node

I would expect:

tsc

to just run through without errors. Instead, I get errors in regards to the typings themselves:

366         isTTY?: true;
                    ~~~~

node_modules/@types/node/index.d.ts(366,17): error TS1110: Type expected.


1907         all?: false;
                   ~~~~~

node_modules/@types/node/index.d.ts(1907,15): error TS1110: Type expected.


1911         all: true;
                  ~~~~

node_modules/@types/node/index.d.ts(1911,14): error TS1110: Type expected.


1930         ttl: true;
                  ~~~~

node_modules/@types/node/index.d.ts(1930,14): error TS1110: Type expected.


4138     type DoesZapCodeSpaceFlag = 0 | 1;
                                     ~

node_modules/@types/node/index.d.ts(4138,33): error TS1110: Type expected.

My typescript will transpile anyways, yet I rather fix these errors. How to fix them?

1 Answers
Related