当前位置:网站首页>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 语言服务
边栏推荐
- 【论文精读】iNeRF
- Qualcomm cDSP simple programming example (to query Qualcomm cDSP usage, signature), RK3588 npu usage query
- Socket Review and I/0 Model
- Daily practice——Randomly generate an integer between 1-100 and see how many times you can guess.Requirements: The number of guesses cannot exceed 7 times, and after each guess, it will prompt "bigger"
- A few permanent free network transmission, convenient and simple (Intranet through tutorials)
- flowable workflow all business concepts
- Flex layout in detail
- TestCafeSummary
- The article you worked so hard to write may not be your original
- UserAgent resolution
猜你喜欢
【论文精读】iNeRF
AI automatic code writing plugin Copilot (co-pilot)
21. Support Vector Machine - Introduction to Kernel Functions
Getting Started with Tkinter
The difference between adding or not adding the ref keyword when a variable of reference type is used as a parameter in a method call in C#
数据分析(一)——matplotlib
[Code Hoof Set Novice Village 600 Questions] Merge two numbers without passing a character array
Realization of character makeup
Go mode tidy reports an error go warning “all” matched no packages
Unity-LineRenderer显示一条线
随机推荐
Redis Overview: Talk to the interviewer all night long about Redis caching, persistence, elimination mechanism, sentinel, and the underlying principles of clusters!...
IDA PRO中汇编结构体识别
Unity-通过预制件和克隆方法动态实现各个UGUI下控件的创建和显示
「APIO2010」巡逻 题解
PCB stackup design
How to debug TestCafe
HTC使用官方固件作为底包制作rom卡刷包教程
21. Support Vector Machine - Introduction to Kernel Functions
hboot与recovery、boot.img、system.img
基于STM32 环形队列来实现串口接收数据
如何减少软件设计和实现之间鸿沟
Dry goods | 10 tips for MySQL add, delete, change query performance optimization
Qualcomm cDSP simple programming example (to query Qualcomm cDSP usage, signature), RK3588 npu usage query
Memblaze released the first enterprise-grade SSD based on long-lasting particles. What is the new value behind it?
The uniapp applet checks and prompts for updates
Pytest first experience
iNeuOS industrial Internet operating system, equipment operation and maintenance business and "low-code" form development tools
MATLAB program design and application 2.4 Common internal functions of MATLAB
C程序设计-方法与实践(清华大学出版社)习题解析
20. Support vector machine - knowledge of mathematical principles