1
votes

I am working on my first node.js project (for learning purposes) and I would like to use TypeScript as language of choice together with Visual Studio Code (yeah, I'm not looking for easy ways). Source code is here: https://github.com/thecoderok/ukrbash-node When I reference node.d.ts in the source code I am getting lots of compilation

errors like:urkbash-node\typings\node\node.d.ts(178,36): error TS1005: ';' expected. urkbash-node\typings\node\node.d.ts(425,5): error TS1008: Unexpected token; 'module, class, interface, enum, import or statement' expected. urkbash-node\typings\node\node.d.ts(425,12): error TS1008: Unexpected token; 'module, class, interface, enum, import or statement' expected. urkbash-node\typings\node\node.d.ts(425,17): error TS1005: ';' expected.

Does anyone know why and how to fix it?

1

1 Answers

1
votes

errors like:urkbash-node\typings\node\node.d.ts(178,36): error TS1005: ';' expected.

Considering the content of the line here Seems like you are using it with TypeScript 1.4 (which doesn't have union types). Please update VS Code to latest to use TS 1.5