DEV Community

loading...

(NodeJS + Typescript = Scalability) - Is this worth it?

marluanespiritusanto profile image Marluan Espirituanto ・1 min read

I've been testing Node with Typescript for a couple of days and I think that it's really a success for developers that come from strongly typed programming languages ​​like C#, Java, C++, etc. Although I really love using Vanilla JavaScript, I must admit that there are things that are better doing them with Typescript.

So, the questions are:

  • Do you think that with Typescript you can get more out of Node, for example applying Design Patterns, Clean Architecture, etc?
  • How scalable could it be?
  • When it is recommended to use Typescript?

Discussion (10)

pic
Editor guide
Collapse
barakplasma profile image
Michael Salaverry

Repos like github.com/torokmark/design_patter... can show you how nice it is to write code which takes advantage of design patterns.

The intellisense provided by vscode on typescript projects will increase your productivity, especially on larger projects with multiple contributors.

Typescript really shines when you type API requests and replies between front end and back end. Although that can also be done using grpc, the intellisense provided is huge. It helps you refactor when am API changes

Collapse
salchichongallo profile image
Jimmy Murillo

Nice Repo! Thanks :)

Collapse
marluanespiritusanto profile image
Marluan Espirituanto Author

Thanks for share this repo with us ☺️

Collapse
lucasmonstro profile image
Collapse
marluanespiritusanto profile image
Marluan Espirituanto Author

Thanks for your recommendation. I didn't know this framework, I took a look and I loved it 😍😍

Collapse
lucasmonstro profile image
Lucas Silva

Architecture everywhere, less code, less test. Best implementation ;)

Collapse
carlosjs23 profile image
Carlos A. Escobar

Nestjs is awesome!!!

Collapse
nickytonline profile image
Nick Taylor (he/him) • Edited

I've been working with React and TypeScript for more than 2 years now and it's 👌. Same goes for node, just less time using it with TS. Even the creator of node is a big fan. See

And with node you don't even need a bundler. Use ts-node with nodemon during dev and only use tsc to build your prod js. And ts-node + ts-jest are great for tests.

Fun fact, if bundling your front-end with webpack and you have ts-node installed, you can write your webpack config in TypeScript.

The liquid tag for my tweet keeps saying liquid: internal error for some reason, so here's the tweet twitter.com/nickytonline/status/95...

Liquid error: internal

🔥🔥🔥🔥

Collapse
goaty92 profile image
goaty92

My experience is that Typescript is definitely more enjoyable to work with than plain JavaScript. It helps you catch (some) errors, provide code completion and backward compilation. In that aspect it is definitely more scalable when you have multiple people working on the same project.
Having said that Typescript isn't a magic wand. It tries to bring strong typings to JavaScript but at the end of the day you still need to be aware that you're working with JavaScript, and many problems still persists. If I have to do frontend work then I'd definitely pick it over JavaScript. However for backend programming I think there are better choices than Nodejs/Typescript

Collapse
htondkar profile image
Hamid Tondkar

One hundred percent.