- Switching to Angular(Third Edition)
- Minko Gechev
- 265字
- 2021-07-02 15:23:36
There's even more to TypeScript
TypeScript by itself has a number of other benefits:
- It is a superset of JavaScript: All JavaScript programs (for example, ES5 and ES2015) are already valid TypeScript ones. In essence, you have already been writing TypeScript code. Since it is based on the latest version of the ECMAScript standard, it allows us to take advantage of the latest bleeding-edge syntax provided by the language.
- It supports optional type checking: If, for any reason, we decide that we don't want to explicitly define the type of a variable or a method, we can just skip the type definition. However, we should be aware that this means we are no longer taking advantage of the static typing, so we are giving up on all the benefits mentioned earlier.
- It is developed and maintained by Microsoft: The quality of the implementation of the language is very high, and it is unlikely that support will be dropped unexpectedly. TypeScript is based on the work of some of the world's best experts in programming language development.
- It is open source: This allows the community to freely contribute to the language and suggest features, which are discussed in an open manner. The fact that TypeScript is open source makes the development of third-party extensions and tools easier. This extends the scope of its usage even further.
Since modern browsers do not support TypeScript natively, there is a compiler that translates the TypeScript code we write into readable JavaScript in a predefined target version of ECMAScript. Once the code is compiled, all the type annotations are removed.
推薦閱讀
- Embedded Linux Projects Using Yocto Project Cookbook
- 數(shù)據(jù)結(jié)構(gòu)習(xí)題精解(C語言實(shí)現(xiàn)+微課視頻)
- INSTANT CakePHP Starter
- FLL+WRO樂高機(jī)器人競(jìng)賽教程:機(jī)械、巡線與PID
- Access 2016數(shù)據(jù)庫管
- Visual FoxPro程序設(shè)計(jì)習(xí)題集及實(shí)驗(yàn)指導(dǎo)(第四版)
- SSM開發(fā)實(shí)戰(zhàn)教程(Spring+Spring MVC+MyBatis)
- C/C++數(shù)據(jù)結(jié)構(gòu)與算法速學(xué)速用大辭典
- Three.js權(quán)威指南:在網(wǎng)頁上創(chuàng)建3D圖形和動(dòng)畫的方法與實(shí)踐(原書第4版)
- 從零開始構(gòu)建深度前饋神經(jīng)網(wǎng)絡(luò):Python+TensorFlow 2.x
- Web前端開發(fā)技術(shù)實(shí)踐指導(dǎo)教程
- Django 2.0 入門與實(shí)踐
- Java程序性能優(yōu)化實(shí)戰(zhàn)
- Java程序設(shè)計(jì)基礎(chǔ)教程
- Web前端開發(fā)實(shí)戰(zhàn)教程(HTML5+CSS3+JavaScript)(微課版)