- Web & App
- On this page:
- What is TypeScript?
- Which One Is Better?
What is TypeScript?
History of TypeScript
- On October 2012 TypeScript was released with version 0.8, later on, October 2013 version 0.9 was released
- Then in 2014 Microsoft added support for generics and released TypeScript version 1.0
- The TypeScript developer team at Microsoft then developed TypeScript compiler in July 2014 which promised five times more performance
- Microsoft later released TypeScript 2.0 in September 2016 that included new features like optionally preventing variables from entering null values.
- Conditional types were added in March 2018
- In 1998 ECMAScript 2 was released
- In 1999 ECMAScript 3 was released
- Mozilla and Eich joined ECMA to develop EX4 in 2005
- To define a shared standard library CommonJS project was launched in January 2009
- ECMAScript 5.1 was released in June 2011
- ECMAScript 2016 was released in June 2015
- In June 2017 the current version ECMAScript 2017 was launched
Features of TypeScript
- TypeScript can be used anywhere: Any browser, device, or operating system can run the TypeScript code smoothly. The code is not specific to any virtual engine or operating system.
- Server communication: Before the page gets sent off to the server-side, it gives the option for validation of user input.
- Interaction: User experiences can be made more pleasurable by creating an interface where the button produces a reaction as soon as it hovers their mouse over it.
|Type||Object-oriented powerful compile language||Interpreted programming language of high level|
|Developed by||Andres Hejlsberg at Microsoft||Brenden Eich at Netscape Corporation|
|Light/Heavyweight||It is a lightweight interpreted coding language||Heavyweight and designed to develop complex applications|
|Server/Client-side||Built mostly for client-side use||Can be used both sides|
|File extension||.ts, .tsx||.js|
|Annotations||Must be annotated constantly||Not required|
|Modules||Supports modules||Does not support modules|
|Interface||Has an interface||Does not have an interface|
|Companies using||Clever, Asana, Screen award||Airbnb. Instagram, Codecademy|
Prefer compile-time type checking: Using vanilla TypeScript, it is entirely possible to perform runtime type verification. Keep in mind that this also adds extra runtime, which you can avoid using compile-time validation.
Working with a new library or Framework: If you are taking up a new project that uses React and are not familiar with its API’s, then you need to know that they offer type definitions. You can use IntelliSense to help you navigate through and discover new interfaces.
Large projects or multiple developers: If you have a large project that you are working on or have various developers working together, then TypeScript is the best choice. The interface of TypeScript and access modifiers can be a bonus in communicating APIs.
Steady testing workflow: Having a team already implementing test-driven development is better than switching to TypeScript even with all its associated costs and features.
Added dependencies: You need type definitions of the libraries which you want to use in TypeScript. An added type definition results in an extra epm package. There is risk involved by using this extra type definition that they may go unmaintained or they might be an incorrect option. Also, not using the type definitions in TS is a loss as it is the best feature of TypeScript. Therefore, choose a popular library for your project as there are chances that it will be appropriately maintained in foreseeable future.
Unsupported Framework: Some frameworks do not support TS. TS does not support frameworks such as EmberJS, so you may not be able to take advantage of its features.
There are many web development tools available out there that can be used along with these two languages to boost your productivity.
Which One Is Better?
We saw the two popular options currently used widely for web development, but are these the only two to choose from? The answer is no. There are two more types of development tools worth paying attention to
- Facebook flow
- Google Closure
On the other hand, TypeScript compiles into JS code, which can be used wherever JS is applicable. Still, TypeScript comes with additional features, so it is gaining popularity and used by a wider audience. It is also receiving new features and improvements constantly, therefore, making it a safer bet for future use as well.
Author : Greg Wilson
I am Greg Wilson, a Content Writer working with GoodFirms, a research and review platform for service and software companies. I am passionate about blogging, creative writing, social media, and content marketing. I write blog posts for GoodFirms about SEO softwares, Cloud computing, IoT development, and many more such categories.
Come meet us at a location near you!
39899 Balentine Drive,
Newark, CA 94560
1301 Fannin St #2440,
Houston, TX 77002
501 E Las Olas Blvd Suite
230, Fort Lauderdale, FL
4915 54 St 3rd Floor
Red Deer, ABT T4N 2G7
Harju County, Tallinn, downtown, Tartu mnt 67 / 1-13B, 10115
3/25, Block 5, Gulshan-e-Iqbal,
Karachi, Sindh 75650
Let’s get in touch!
Let’s discuss your project and find out what we can do to provide value.
I am interested in discussing my ideas with you for
COPYRIGHT 2019 TEKREVOL ALL RIGHTS RESERVED.