
In this lecture, we will analyse a practical example of a simple adder function where javascript fails to intimate the developer about a potential error / bug introduced to the system that causes unintended behaviour at runtime causing corrupted production code.
In this lab experiment, you will try to play with a sample javascript code in order to understand the fundamental problem with JavaScript during runtime.
Let's set up a bootstrap playground project from scratch which will help you understand each topic / concept we discuss throughout this Bootcamp. You will also have the ability to change code and observe the behaviour.
You can also see the errors via either VS Code intellisense or during compilation.
VS Code extensions are really handy. So install these in your local machine so that it matches my setup. This will make it easy for you to annotate and color code as we try to understand various TS concepts.
TypeScript is a superset of JavaScript developed at Microsoft by Anders Hejlsberg ( designer of C# ) in the year 2010 and open-sourced in 2012. TypeScript adds a handful of new features to JavaScript and takes it to the next level in modern web development.
There are a lot of advantages if you add TypeScript to your JavaScript-based projects like:
You can catch bugs errors during the development phase itself rather than runtime.
Debugging is much easier & you will have bug-free production code and feel safe.
With static type-checking, it becomes easier for you to spot errors and edge cases.
Saves a lot of developer's time in fixing unidentifiable runtime bugs.
TypeScript adds advanced features like generics, modules & namespaces.
Your projects will be easily understandable by other developers.
Your project will have excellent developer experience ( DX ) and team velocity.
Helps you write less code than JavaScript & improves readability.
Source code documentation will be much better.
TypeScript code is easier to refactor and reliable. Hence easier to maintain.
Since JavaScript is a subset of TypeScript, you can use all JavaScript libraries.
You can incrementally upgrade your JavaScript files on the go.
TypeScript is a powerful tool for large applications
After completing MSK TypeScript Bootcamp, you will be able to:
Understand the problem with JavaScript for large scale applications.
Add TypeScript to your JavaScript projects with the compiler configuration.
Include TypeScript and start adding type annotations in your JavaScript projects.
Fully understand all the types supported by TypeScript in depth.
Feel confident in your front-end interview and talk about TypeScript.
Download all the code snippets and create your personal reference notes.
This Bootcamp features hands-on coding lab experiments which are both fun and useful. They will help you understand concepts and play around with TypeScript features. You will have the opportunity to keep those examples for your reference as we advance ourselves to learn more TypeScript features in this series of upcoming Bootcamps.
Your journey to become a master of TypeScript begins here.
Let's get started...