TypeScript Interview Questions and Answers

TypeScript is a language that aims at easing development of large scale applications written in JavaScript. TypeScript adds common concepts such as classes, modules, interfaces, generics and (optional) static typing to JavaScript. It is a superset of JavaScript: all JavaScript code is valid TypeScript code so it can be added seamlessly to any project. The TypeScript compiler emits JavaScript.

TypeScript is a superset of the JavaScript language. It differentiates itself from competitors like CoffeeScript and Dart in that plain JavaScript code can be intermixed with TypeScript. Therefore, JavaScript is TypeScript. But TypeScript has to be compiled into JavaScript before it can run in any JavaScript engine (web browser or node.js). This means you cannot embed TypeScript into a web page directly using <script> tags, but TypeScript (in .TS files) can get compiled into JavaScript (in .JS files) for usage.

TypeScript supports definition files that can contain type information of existing JavaScript libraries, much like C++ header files can describe the structure of existing object files. This enables other programs to use the values defined in the files as if they were statically typed TypeScript entities. There are third-party header files for popular libraries such as jQuery, MongoDB, and D3.js. TypeScript headers for the Node.js basic modules are also available, allowing development of Node.js programs within TypeScript.

First public version released in 2012 (TypeScript 0.8)

Scroll to Top