What is TypeScript?

Who created the JavaScript-compatible programming language, and what is it used for?

Developed by Microsoft, TypeScript is an open source programming language that serves as a superset of JavaScript, and is predominately used to write large applications.

Conceptualised just under 10 years ago, Typescript was born from a need among Microsoft developers' ranks to create a form of JavaScript that was much easier to write with, more maintainable, and could handle expanding loads.

The first public version was released in 2012, and support has since been incorporated into a host of applications, for example, TypeScript for Visual Studio. But its open source nature means the underlying source code is available for developers to utilise and build on via GitHub.

Who created TypeScript?

This programming language is the culmination of years' work by Microsoft developers who grew frustrated at the lack of necessary features within JavaScript to productively write and maintain large-scale applications.

"JavaScript was never really designed to be a programming language for big applications. It's a scripting language," explained Microsoft fellow and TypeScript founder Anders Hejlsberg, introducing the programming language in 2012. "It doesn't have static typing, but more importantly perhaps it lacks some of the structuring mechanisms you need in larger applications, like classes and modules, and perhaps interfaces."

Advertisement
Advertisement - Article continues below
Advertisement - Article continues below

When they were trying to see where they could go next with javascript development tools, he continued, Microsoft developers started learning that many people in the industry who encountered this issue turned to Google's GWT, or the open-source C#-based ScriptShark, integrated with software such as Microsoft Visual Studio.

But the issue with this is that the language shifted away from JavaScript, and was therefore difficult to maintain. Their solution was to strengthen JavaScript and create a fully-compatible language, TypeScript, which was made freely available to developers.

Typescript vs JavaScript

TypeScript is known as a superset of JavaScript, and is fully compatible with this, but it still retains a level of independence as a language. In other words, a programme written in JavaScript is also a valid TypeScript programme, and such an app can seamlessly fuse with the former language too.

TypeScript wasn't created as a replacement for JavaScript, and is essentially a form of the ECMAScript-based programming language that scales. It's an escalation of the language, or an expansion, that was designed to smooth out some of the trickiest aspects of coding for JavaScript developers. It's especially important for handling large-scale applications, and because it's a superset of JavaScript, you can merge the two languages without the TypeScript compiler flagging errors in the code. This also means you can exploit a host of additional features such as classes, arrow functions,and modules without departing the JavaScript ecosystem.

One of the biggest differences in the way the two languages function is that TypeScript identifies errors in the code as you type, which is known as static typing. Dynamic typing, on the other hand, means it's not possible to identify a mistake until the code is executed. This could, in turn, lead to minor errors being buried in the larger codebase.

Advertisement - Article continues below

Several integrated development environments (IDE), meanwhile, allow support for TypeScript. These include platforms like VS Doe, ATom Sublime, and Microsoft Visual Studio. Which system you opt for is, however, often a matter of personal preference and any particular project's needs.

Featured Resources

The IT Pro guide to Windows 10 migration

Everything you need to know for a successful transition

Download now

Managing security risk and compliance in a challenging landscape

How key technology partners grow with your organisation

Download now

Software-defined storage for dummies

Control storage costs, eliminate storage bottlenecks and solve storage management challenges

Download now

6 best practices for escaping ransomware

A complete guide to tackling ransomware attacks

Download now
Advertisement

Most Popular

Visit/operating-systems/microsoft-windows/354297/this-exploit-could-give-users-free-windows-7-updates
Microsoft Windows

This exploit could give users free Windows 7 updates beyond 2020

9 Dec 2019
Visit/business/business-strategy/354304/ex-apple-cpu-architect-accuses-the-firm-of-invading-privacy
Business strategy

Ex-Apple CPU architect accuses the firm of invading privacy

10 Dec 2019
Visit/security/vulnerability/354309/patch-issued-for-critical-windows-bug
vulnerability

Patch issued for critical Windows bug

11 Dec 2019
Visit/cloud/microsoft-azure/354230/microsoft-not-amazon-is-going-to-win-the-cloud-wars
Microsoft Azure

Microsoft, not Amazon, is going to win the cloud wars

30 Nov 2019