官术网_书友最值得收藏!

  • TypeScript Essentials
  • Christopher Nance
  • 166字
  • 2021-08-05 17:43:26

Chapter 2. TypeScript Basics

One of the primary benefits of compiled languages is that they provide a more plain syntax for the developer to work with before the code is eventually converted to machine code. TypeScript is able to bring this advantage to JavaScript development by wrapping several different patterns into language constructs that allow us to write better code. We have talked a little bit about the static type system that TypeScript adds on top of JavaScript. Every explicit type annotation that is provided is simply syntactic sugar that will be removed during compilation, but not before their constraints are analyzed and any errors are caught. In this chapter, we will explore this type system in depth. We will also discuss the different language structures that TypeScript introduces. We will look at how these structures are emitted by the compiler into plain JavaScript. This chapter will contain a detailed look at each of these concepts:

  • Types
  • Functions
  • Interfaces
  • Classes
  • Enums
  • Modules
  • Generic types
主站蜘蛛池模板: 芜湖市| 丰都县| 白水县| 沂水县| 察哈| 宜昌市| 台中县| 定南县| 玉环县| 会理县| 沐川县| 彩票| 闸北区| 壤塘县| 三江| 湖州市| 夹江县| 汶川县| 萨迦县| 鹤庆县| 隆德县| 肥城市| 肇庆市| 洛川县| 永胜县| 德保县| 普宁市| 罗江县| 星子县| 大厂| 团风县| 秦皇岛市| 孙吴县| 军事| 丹巴县| 福州市| 鲁山县| 耿马| 留坝县| 福安市| 图片|