当前位置:网站首页>Components of TypeScript
Components of TypeScript
2022-07-31 22:34:00 【HUAWEI CLOUD】
TypeScript Language, part for three main layer.Each of these layers are divided into sub layers or components.在下图中,We can see three layer and its internal components.这些层是:
Language
TypeScript 编译器
TypeScript 语言服务
1. Language
它具有 TypeScript 语言元素.It contains grammar、Keywords and type annotation elements such as.
2. TypeScript 编译器
TypeScript 编译器 (TSC) 将 TypeScript Program into the JavaScript 代码.It also performs our TypeScript 代码到 JavaScript 代码的解析和类型检查.
Browser does not support direct execution TypeScript 代码.所以用 TypeScript Written procedures must be used JavaScript Equivalent to rewrite,It supports directly in the browser to execute code.为此,TypeScript Comes with a called“tsc”的 TypeScript 编译器.当前版本的 TypeScript 编译器默认支持 ES6.It compiles any module in the source code,如 ES6、SystemJS、AMD 等.
我们可以通过本地、Global or at the same time the use of anynpm包安装 TypeScript 编译器.安装完成后,We can run on the command line“tsc”命令来编译 TypeScript 文件.
##Start the installation npm install typescript -g
例子:
tsc helloworld.ts // 它将 TS 文件 helloworld 编译成 helloworld.js 文件.
编译器配置
TypeScript 编译器配置在tsconfig.json文件中给出,如下所示:
{ "compilerOptions": { "declaration": true, "emitDecoratorMetadata": false, "experimentalDecorators": false, "module": "none", "moduleResolution": "node", "noFallthroughCasesInSwitch": false, "noImplicitAny": false, "noImplicitReturns": false, "removeComments": false, "sourceMap": false, "strictNullChecks": false, "target": "es3" }, "compileOnSave": true }
3. TypeScript 语言服务
边栏推荐
- grep command written test questions
- How to debug TestCafe
- NVIDIA已经开始测试AD106和AD107 GPU核心的显卡产品
- A solution to the server encountered an internal error that prevented it from fulfilling this request [easy to understand]
- spark reports an error OutOfMemory "recommended collection"
- renderjs usage in uni-app
- Binary tree non-recursive traversal
- In Golang go-redis cluster mode, new connections are constantly created, and the problem of decreased efficiency is solved
- Thymeleaf是什么?该如何使用。
- Talking about the algorithm security of network security
猜你喜欢
Socket回顾与I/0模型
利用反射实现一个管理对象信息的简单框架
PCB stackup design
IDA PRO中汇编结构体识别
Federated Learning: Multi-source Knowledge Graph Embedding in Federated Scenarios
不知道该怎么办的同步问题
角色妆容的实现
VOT2021比赛简介
Short-circuit characteristics and protection of SiC MOSFETs
STM32 full series development firmware installation guide under Arduino framework
随机推荐
Transfer Learning - Domain Adaptation
HTC使用官方固件作为底包制作rom卡刷包教程
Student management system on the first day: complete login PyQt5 + MySQL5.8 exit the operation logic
Book of the Month (202207): The Definitive Guide to Swift Programming
UserAgent resolution
The article you worked so hard to write may not be your original
JS basic exercises
BM5 merge k sorted linked lists
Golang - from entry to abandonment
Bika LIMS open source LIMS set - use of SENAITE (detection process)
BM3 flips the nodes in the linked list in groups of k
Fixed-length usage of nanopb string type based on RT1052 Aworks (27)
了解下C# 匿名方法
C#中引用类型的变量做为参数在方法调用时加不加 ref 关键字的不同之处
Shell script quick start to actual combat -02
Federated Learning: Multi-source Knowledge Graph Embedding in Federated Scenarios
VOT2021比赛简介
Financial profitability and solvency indicators
Redis Overview: Talk to the interviewer all night long about Redis caching, persistence, elimination mechanism, sentinel, and the underlying principles of clusters!...
Structure of the actual combat battalion module eight operations