GIVE TYPESCRIPT A CHANCE

GIVE TYPESCRIPT A CHANCE

TypeScript is a "programming language" which offers you all JavaScript benefits and some more addons.

A few things that TypeScript is improving through these addons are:

- level of maturity/safety

- maintainability aspect

- code hygiene

- code readability


I heard a lot of myths about TypeScript. Most of them were "must have" myths, like, "You should have at least 3 years experience with JavaScript to start learning TypeScript" and some of them were bad comments, like "You will mess the apps, the JavaScript libraries don't support TypeScript".?


As a student with 0 real world experience, I got scared by TypeScript. I was seeing it as a programmers' Michael Myers, alongside with Algorithms and Data Structure in Java(this one still remains??).

No alt text provided for this image

But one day, when I felt less sceptical, I gave it a try. Now, I have over 6 months of using it and I can't confirm any of the bad myths about TypeScript. It just improved my efficiency and never felt that I want to go back. Almost, all my portfolio apps are built in TypeScript with the MERN Stack(Mongo, Express, React, Node).

No alt text provided for this image

Bloomberg, a software company, recently faced a big challenge, by moving all engineers from JavaScript's guild to TypeScript and now, all of them, even the most sceptical ones, find it as an improvement.


If an entire company did this big change, then you should give it a try, too and to settle down if the myths are true or not.?


Installing it is not a big deal, so if you want to try it, follow the next steps:

// I'm assuming that you have node and npm installed and updated.


1) Open a terminal

No alt text provided for this image

2) Type "npm i -g typescript"

No alt text provided for this image

2.1) If you want to run the app from terminal install ts-node with "npm i -g ts-node"

3) Create a file named "greeting.ts"

No alt text provided for this image

4) Open it with a code editor

No alt text provided for this image

5) Add this code:

No alt text provided for this image

6) Run the code. If you are using VSCode, you can run it by clicking Run Code button(its default shortcut is Ctrl + Alt + N) or by using terminal, type "node greeting.ts"

No alt text provided for this image

And this is the result:

No alt text provided for this image


You can also find my articles on my portfolio:?mariusatasiei.ro/blog

要查看或添加评论,请登录

Marius Atasiei的更多文章

  • Boost Your Flutter App's Speed with Dart?Isolates

    Boost Your Flutter App's Speed with Dart?Isolates

    Imagine building a super-fast Flutter app that never leaves your users waiting. That’s where Dart isolates come in!…

  • Effortless App Development: Flutter and Riverpod in Action

    Effortless App Development: Flutter and Riverpod in Action

    Flutter, Google’s UI toolkit, has revolutionized how developers build beautiful, cross-platform apps. When paired with…

  • SOLID Principles using Dart

    SOLID Principles using Dart

    In the world of software development, crafting maintainable, scalable, and adaptable code is crucial. SOLID principles…

  • CSS Tips: 3 Features that you should know

    CSS Tips: 3 Features that you should know

    1) is function If you have to target multiple elements from multiple targets like this: You can use the is function to…

    1 条评论
  • Clean React: Better Imports

    Clean React: Better Imports

    JavaScript may be the worst programming language when it comes to import. And we all hate those 20 lines of imports we…

    2 条评论
  • Fast JavaScript: Dynamic imports

    Fast JavaScript: Dynamic imports

    For having a clean code in JavaScript, you must use multiple modules which are imported from one to another. But some…

    7 条评论
  • 8 VSCODE EXTENSIONS THAT EVERY WEB DEVELOPER HAVE TO USE

    8 VSCODE EXTENSIONS THAT EVERY WEB DEVELOPER HAVE TO USE

    One of the best features that IDEs have, is the extensions. The extensions help you to be as efficient as possible and…

    5 条评论
  • 5 HTML Tips for Better Websites

    5 HTML Tips for Better Websites

    React, Angular, Vue. Indifferent what framework do you use, as a frontend developer, you have to deal with HTML.

  • Advanced TypeScript Methods

    Advanced TypeScript Methods

    Restrict types of parameter dynamically 1. Create type Row and Col 2.

社区洞察

其他会员也浏览了