当前位置:网站首页>Introduction tutorial of typescript (dark horse programmer of station B)
Introduction tutorial of typescript (dark horse programmer of station B)
2022-07-06 10:18:00 【Giant Zhang】
Video link :https://www.bilibili.com/video/BV14Z4y1u7pi?p=1
1. TypeScript Introduce
1.1 TypeScript What is it?
1.2 TypeScript Why for JS Add type support ?
1.3 TypeScript comparison JS The advantages of
2. TypeScript First experience
2.1 Installation and compilation TS The toolkit
2.2 Compile and run TS Code
2.3 Simplify operation TS Steps for
- Be careful : if
ts-node hello.ts
Error report in execution , You need to execute the command firsttsc --init
Create a tsconfig.json file , The document is TypeScript The configuration file for the project - tsconfig.json contain TypeScript Compile the relevant configuration , Compile configuration items by changing , We can get TypeScript Compiled ES6、ES5、node Code for .
3. TypeScript Common types
3.1 Type notes
3.2 Overview of common foundation types
3.3 The original type
3.4 An array type
3.5 Type the alias
3.6 Function type
- If the function does not return a value , that , Function return value type is :void.
3.7 object type
3.8 Interface
3.9 Tuples
3.10 type inference
3.11 Types of assertions
3.12 Literal type
3.13 enumeration
3.14 any type
3.15 typeof
4. TypeScript Advanced type
4.1 class class
- Two ways of class inheritance :1 extends( Inherited parent class ) 2 implements( Implementation interface ).
- Class member visibility : have access to TS To control class Method or property of for class Whether the code outside is visible .
- public
- protected
- private
- readonly
4.2 Type compatibility
4.3 Cross type
4.4 Generic
Partial<Type>
Readonly<Type>
Pick<Type, Keys>
Record<Keys, Type>
4.5 Index signature type
4.6 Mapping type
5. TypeScript Type declaration file
5.1 TS Two file types in
5.2 Instructions for using the type declaration file
6. stay React Use in TypeScript
6.1 Use CRA Create support TS Project
6.2 TS The configuration file tsconfig.json
6.3 React Common types in
边栏推荐
- Not registered via @enableconfigurationproperties, marked (@configurationproperties use)
- MySQL底层的逻辑架构
- MySQL实战优化高手06 生产经验:互联网公司的生产环境数据库是如何进行性能测试的?
- 安装OpenCV时遇到的几种错误
- MySQL实战优化高手08 生产经验:在数据库的压测过程中,如何360度无死角观察机器性能?
- 西南大学:胡航-关于学习行为和学习效果分析
- A necessary soft skill for Software Test Engineers: structured thinking
- Random notes
- Configure system environment variables through bat script
- text 文本数据增强方法 data argumentation
猜你喜欢
AI的路线和资源
Notes of Dr. Carolyn ROS é's social networking speech
History of object recognition
实现以form-data参数发送post请求
Use xtrabackup for MySQL database physical backup
MySQL实战优化高手11 从数据的增删改开始讲起,回顾一下Buffer Pool在数据库里的地位
西南大学:胡航-关于学习行为和学习效果分析
16 medical registration system_ [order by appointment]
The appearance is popular. Two JSON visualization tools are recommended for use with swagger. It's really fragrant
The programming ranking list came out in February. Is the result as you expected?
随机推荐
Solve the problem of remote connection to MySQL under Linux in Windows
寶塔的安裝和flask項目部署
Chrome浏览器端跨域不能访问问题处理办法
MySQL real battle optimization expert 08 production experience: how to observe the machine performance 360 degrees without dead angle in the process of database pressure test?
Good blog good material record link
13 medical registration system_ [wechat login]
Typescript入门教程(B站黑马程序员)
Some thoughts on the study of 51 single chip microcomputer
[after reading the series] how to realize app automation without programming (automatically start Kwai APP)
C miscellaneous two-way circular linked list
宝塔的安装和flask项目部署
C miscellaneous lecture continued
MySQL实战优化高手03 用一次数据更新流程,初步了解InnoDB存储引擎的架构设计
Random notes
MySQL实战优化高手07 生产经验:如何对生产环境中的数据库进行360度无死角压测?
MySQL实战优化高手06 生产经验:互联网公司的生产环境数据库是如何进行性能测试的?
Configure system environment variables through bat script
Constants and pointers
17 medical registration system_ [wechat Payment]
MySQL real battle optimization expert 11 starts with the addition, deletion and modification of data. Review the status of buffer pool in the database