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)
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
Nice Repo! Thanks :)
Thanks for share this repo with us โบ๏ธ
Use docs.nestjs.com
Thanks for your recommendation. I didn't know this framework, I took a look and I loved it ๐๐
Architecture everywhere, less code, less test. Best implementation ;)
Nestjs is awesome!!!
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
10 Things I Regret About Node.js
โ๐๐๐ ๐๐๐ช๐๐ ๐ฃ
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
๐ฅ๐ฅ๐ฅ๐ฅ
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
One hundred percent.