5 ms·
Did any of you have good experience using typescript on node.js project? I remember trying out typescript with few tutorials, but so far mostly on the browser
by a-saleh 10y ago
Did any of you have good experience using typescript on node.js project?
I remember trying out typescript with few tutorials, but so far mostly on the browser side (i.e angular 2 is in typescript) and when I poked around I couldn't really figure out how to hook up to the npm ecosystem.
Was that just a lack of decent google-fu that particular day?
- pingec 10y agoSure, there are a few steps to make a hello world work but then you soon realise they make sense and it's smooth sailing. I would suggest this link: https://code.visualstudio.com/docs/runtimes/nodejs https://code.visualstudio.com/docs/runtimes/nodejs
- d357r0y3r 10y agoYes, wouldn't even consider using node without TypeScript, personally. Really, the main pieces that could seems a little mysterious are type definitions and compiler options. tsconfig.json exists in the root of the project for compiler options. Type definitions can be managed by a library called 'typings', or for TypeScript 2.0, type definitions can be managed with npm.
- mercer 10y agoThe biggest problems I had with TypeScript involved type definitions, combined with the module system. Now, the latter is not TS' fault and a bit clusterfuck at the moment for everyone, but it's a bit more complicated if you add TS to the mix. It's improved immensely though in the past months/year.