Appendix B. TypeScript essentials
TypeScript was released in 2012 by Microsoft, and its core developer was Anders Hejlsberg. He’s also one of the authors of Turbo Pascal and Delphi, and is a lead architect of C#. In this appendix, we’ll cover main elements of the TypeScript syntax.
We’ll also show you how to turn TypeScript code into JavaScript (ES5) so it can be executed by any web browser or a standalone JavaScript engine. This appendix doesn’t offer a complete coverage of TypeScript. Refer to the TypeScript documentation at www.typescriptlang.org/docs/home.html for complete coverage. Also, TypeScript supports all syntax constructs described in appendix A, so we don’t repeat those here.
Web browsers don’t understand any language but JavaScript. If the source code is written in TypeScript, it has to be transpiled into JavaScript before you can run it in a JavaScript engine, whether browser or standalone.
Transpiling means converting the source code of a program in one language into source code in another language. Many developers prefer to use the word compiling, so phrases like “TypeScript compiler” and “compile TypeScript into JavaScript” are also valid.