当前位置:网站首页>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
边栏推荐
- ① BOKE
- Notes of Dr. Carolyn ROS é's social networking speech
- 16 医疗挂号系统_【预约下单】
- Not registered via @enableconfigurationproperties, marked (@configurationproperties use)
- Zsh configuration file
- Routes and resources of AI
- Implement context manager through with
- Hugo blog graphical writing tool -- QT practice
- MySQL storage engine
- MySQL的存储引擎
猜你喜欢
MySQL的存储引擎
jar运行报错no main manifest attribute
Automation sequences of canoe simulation functions
C miscellaneous lecture continued
Some thoughts on the study of 51 single chip microcomputer
MySQL real battle optimization expert 11 starts with the addition, deletion and modification of data. Review the status of buffer pool in the database
Cmooc Internet + education
Preliminary introduction to C miscellaneous lecture document
华南技术栈CNN+Bilstm+Attention
max-flow min-cut
随机推荐
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?
CANoe CAPL文件操作目录合集
软件测试工程师发展规划路线
Contest3145 - the 37th game of 2021 freshman individual training match_ B: Password
[CV] target detection: derivation of common terms and map evaluation indicators
MySQL实战优化高手11 从数据的增删改开始讲起,回顾一下Buffer Pool在数据库里的地位
NLP路线和资源
What should the redis cluster solution do? What are the plans?
Several errors encountered when installing opencv
高并发系统的限流方案研究,其实限流实现也不复杂
百度百科数据爬取及内容分类识别
Carolyn Rosé博士的社交互通演讲记录
MySQL实战优化高手10 生产经验:如何为数据库的监控系统部署可视化报表系统?
Installation de la pagode et déploiement du projet flask
Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)
The replay block of canoe still needs to be combined with CAPL script to make it clear
Flash operation and maintenance script (running for a long time)
Implement sending post request with form data parameter
在CANoe中通過Panel面板控制Test Module 運行(初級)
[flask] crud addition and query operation of data