I currently use TypeScript with my job. My exposure to TypeScript has changed; I use TypeScript on a regular basis! And my constant exposure to TypeScript is changing my attitude about it. While I still think that TypeScript is a nice tool and not completely necessary, I do realize it is a great tool. If I look at my shelf of web development tools, I will definitely reach for TypeScript first now.
TypeScript rocks! Let me show one reason why.
TypeScript gives the opportunity to map paths that look like NPM modules to relative paths in the project.
Lets say I have a local module in my project at
src/app/mylocalmodule. I can go into the
tsconfig.json file and specify an NPM-like path! So now anywhere else in my TypeScript project, I can refer to
@ag/mylocalmodule instead of some relative path! The example relative path
../../../app/mylocalmodule can now just change to
@ag/mylocalmodule. That’s fantastic! It saves trying to mentally map where things are relative to the current working directory.
I’ll keep using TypeScript. It is a great tool that I am excited to use. It can save so much mental mapping and awareness for me so that I can focus on the actual programming aspect instead of bugs. I have a programming relative that could say, “Ha! I told you so!” And yep, he was right. And he’ll probably read this too. I like using TypeScript and I guess any programming language that has a strict type system! There are a few Rust things that I have done! TypeScript is a great tool to help me be a better programmer.