Qiscus X Jogja JS 8: Learn about TypeScript and How to Configure It

What is TypeScript?

JavaScript is not a new thing for a web programmer or a software developer. It is a well-known programming language in digital world. It became one of the programming languages that can be used to create Windows-based applications.

Unfortunately, in creating large-scale complex applications using JavaScript is not so easy. Microsoft, a multinational technology company form United States of America, has created a new programming language to overcome the issue. To facilitate web programmers and software developers in creating large-scale JavaScript-based applications, Microsoft created a compiler language named TypeScript. This compiler language first appeared five years ago but just officially released on November 2017. Anders Hejlsberg, lead architect of C# and creator of Delphi and Turbo Pascal, has worked on the development of this compiler language.

A compiler language is a language to simplify text from the authentic programming language. It is created to give web programmers and software developers an efficient option in the way of typing their code-orders. TypeScript supports files that contain type information of JavaScript data that enables other programs to use it as if they were statically typed TypeScript entities. In the sort explanation, TypeScript will be compiled into JavaScript.

Technologies Like TypeScript

If you wonder whether there is a technology like TypeScript, there is CoffeeScript. In fact, both serves a different purpose. CoffeeScript provides readability for human, but TypeScript also provides readability for tools as it has optional static typing. There is also Dart, a full replacement for JavaScript that can also produce JavaScript code.

TypeScript Features

TypeScript has more sophisticated features than JavaScript. You can prefer it to make your works as web programmer and software developer easier. It contains of Support Class and Module where TypeScript can create class, extends, and module just like classic object-oriented. Besides that, it has Support ES6 feature, the new version of JavaScript/ECMAScript. More importantly, TypeScript also has its Static Type-Checking feature. It can track error syntax in compiling process.

Below are the details of TypeScript:

  • Support Class and Module

In object-oriented programming, a class is like program-code-template that can be extended to create object, give initial value for variable and implementations of behaviors (like function and methods). Therefore, modular programming is a software design technique. Both still exist in TypeScript.

  • Static Type-Checking

TypeScript will check typing order. A warning will show on during compile time.

  • Support ES6 Feature

TypeScript is language extension that adds a lot features from ECMAScript. They include type annotations and compile-time type checking, type interference, type erasure, interfaces, enumerated type, mixin, generic, namespaces, tuple, and await.  

Also read: “TechTalk#103: Things about Chat & AI that C-Levels Must Know

  • Clear Library API Definition

TypeScript can use your own library to simplify the way you do their works. You just need to create file .d.ts to declare all public type and API from your library. This definition file will turn out to be a clear and accurate reference of the public APIs. They are always be maintained and up-to-date.

  • Build-in Support for JavaScript Packaging

You can specify one main TypeScript file entry and refer it to all the TypeScript files that they need in JavaScript output file. Thus, you can easily customize their library into multiple versions.

  • Similarity of Syntax for Back-end

TypeScript similarity for languages allow you to switch between front-end and back-end to make programming more stable and current.

  • Superset from JavaScript

As superset of JavaScript, TypeScript will be easier to be understood for JavaScript developers. You can easily adapt it in your existing JavaScript project. No need to start over the project you already process.

Because of seven sophisticated features mentioned above, no wonder why TypeScript now is being chosen by developers and leads its way in digital industry.  

Qiscus X Jogja JS

To give awareness and knowledge of TypeScript and its details, Qiscus put is as the topic for its last event for digital community on Saturday, 27 January 2018. This Talk show, held in Qiscus Office in Yogyakarta, introduced the basics of TypeScript and its excellences compared to JavaScript. The Q&A Session also opened to facilitate the participants who deal with the difficulties in understanding and operating TypeScript. Afief Sholichuddin as the speaker of the event gave live simulation to configure this interesting compiler language. Even when TypeScript already been made its debut five years ago, there are still some programmers and developers who do not really know how to configure it.

“TypeScript is also called as strict syntactical superset of JavaScript. It means all the JavaScript codes is also TypeScript codes. This programming language offers class, interface, module, and interface. So that, software developers can develop complex application easier than before. That is the difference of TypeScript and JavaScript,” said Afief as Qiscus’ Front-end Developer.

Also read: “TechTalk: Improving Digital Literacy in Indonesia

Nowadays, TypeScript became more popular for several reasons. First, main development framework of applications really depends on it. This programming language also influences the increased productivity of developers in the dynamic JavaScript world.

Quoted from Stack Overflow Developer Survey and Annual RedMonk Programming Language Rangkings, it is shown that TypeScript reached its high popularity. By providing minimal checking syntax than JavaScript, this compiler language allows software developers to type-check their codes in order to uncover bug and generally improve the organization and documentation with large-scale JavaScript-based.

On the other hand, GitHub State of the Octoverse in 2016 ranked TypeScript as 15th most popular language from 316 developing programming languages that are used in GitHub projects (based on pull requests and an increase in tensile requests for TypeScript above 250 percent over the previous year).

“Actually, if you already knew the basic of JavaScript, it will be easier to use TypeScript. As this programming language only develops the ability of the JavaScript itself,” said Afief.

What Can Qiscus Do for You?

TypeScript is being used as part of the detail projects for our clients. It is more effective and efficient, saving our time creating the platform as requested by our clients. As Software Developer Kit (SDK) service provider, we can provide the best valuable and efficient service for your business. Read our stories in our blog and drop your inquiries at [email protected]



Leave a Comment

Show Buttons
Hide Buttons