Disclosure: Hackr.io is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.
Table of Contents
Companies that use TypeScript include Microsoft, Google, PayPal, Netflix, and Uber.
- Flexible, dynamic, and cross-platform
- Used for both client-side and server-side implementations
- Lightweight interpreted
- Supported by all browsers
- Weakly typed
- JIT compilation
What is TypeScript?
TypeScript is strongly typed. This makes it better to debug (during compile time) which is a more efficient way to code for large projects. TypeScript programs typically consist of modules, functions, variables, comments, expressions, and statements – just like any other full-fledged programming language.
When the code becomes huge, complex to handle, and prone to errors, it is better if the errors are caught during compile time itself. That is where TypeScript helps.
Companies that use TypeScript include Microsoft, Slack, Medium, and Accenture.
Some of TypeScript’s most prominent features are:
- Easy to maintain and enhances project productivity.
- Static typing and annotations are possible.
- Supports object-oriented features like interface, inheritance, and classes.
- Easy to debug and early detection of errors.
- Supports ES6 (ECMAScript) that offers easier syntax to handle objects and inheritance features.
- Good full-fledged IDE support.
|Errors can be found and corrected during compile time.||Errors can be found only during run-time as it is an interpreted language.|
|Strongly typed, supports both static and dynamic typing.||Weakly typed, no option for static typing.|
|There is support for ES3, ES4, ES5 and ES6.||No support for compiling additional ES3, ES4, ES5 or ES6 features.|
|Supports modules, generics and interfaces to define data.||No support for modules, generics or interface.|
|Functions can have optional parameters.||Functions cannot have optional parameters.|
|Numbers and strings are considered as interfaces.||Number and string are objects.|
|Powerful and intuitive language for large projects.||Neat and clean, most suitable for simple web applications.|
|Community support is still growing.||Huge community support with lots of documentation and support for solving issues.|
|Prototyping is possible||No support for prototyping.|
|Takes time to learn and code, scripting knowledge is a must.||Can be learned on the go, no prior scripting experience is needed.|
|Proper build setup (npm package) is required for static type definitions||No build setup is required.|
If you learn TypeScript, you can work on both JS as well as TypeScript projects. Start learning TypeScript today.
Frequently Asked Questions
Google uses TypeScript for its web application framework Angular. An example of a product that uses TypeScript is Google Analytics.
People are also reading: