- Hands-On Full Stack Web Development with Angular 6 and Laravel 5
- Fernando Monteiro
- 227字
- 2021-07-23 19:18:48
The Benefits of TypeScript
TypeScript enables you to write JavaScript code. It includes static typing and other features that are very common in object-oriented languages. In addition, with TypeScript, you can use all of the features of ECMAScript 6, because the compiler converts them into readable code for the current browser.
One of the features of TypeScript is that users can create typed variables, like it is done in Java or C# (for example, const VARIABLE_NAME: Type = Value), Not only that, but TypeScript helps us to write clean, well-organized code. That is one of the reasons why the Angular team adopted TypeScript for the current version of the framework.
Before we begin, let's look at what the official TypeScript documentation states:
Any browser. Any host."
In this chapter, we will install TypeScript in our environment globally, in order to understand what happens with TypeScript files when they are converted to JavaScript. Don't worry; Angular applications already provide us with a TypeScript compiler, built into the Angular CLI.
In this chapter, we will cover the following points:
- Installing TypeScript
- The benefits of using TypeScript
- How to transpile a TypeScript file to a JavaScript file
- Writing JavaScript code with static typing
- Understanding interfaces, classes, and generics in TypeScript
- 自動(dòng)駕駛網(wǎng)絡(luò):自智時(shí)代的網(wǎng)絡(luò)架構(gòu)
- Building E-commerce Sites with VirtueMart Cookbook
- 物聯(lián)網(wǎng)安全:理論、實(shí)踐與創(chuàng)新
- 網(wǎng)絡(luò)故障現(xiàn)場(chǎng)處理實(shí)踐(第4版)
- SD-WAN架構(gòu)與技術(shù)(第2版)
- 信息通信網(wǎng)絡(luò)建設(shè)安全管理概要2
- 互聯(lián)網(wǎng)安全的40個(gè)智慧洞見(jiàn):2014年中國(guó)互聯(lián)網(wǎng)安全大會(huì)文集
- 網(wǎng)絡(luò)的琴弦:玩轉(zhuǎn)IP看監(jiān)控
- Windows Server 2012 Hyper-V虛擬化管理實(shí)踐
- Working with Legacy Systems
- 搶占下一個(gè)智能風(fēng)口:移動(dòng)物聯(lián)網(wǎng)
- 6G:面向2030年的移動(dòng)通信
- Hands-On Microservices with Node.js
- INSTANT LinkedIn Customization How-to
- 園區(qū)網(wǎng)絡(luò)架構(gòu)與技術(shù)