Typescript All In One
2024-10-10 10:20:21
Typescript All In One
TypeScript 3.5 is now available.
https://www.typescriptlang.org/#download-links
# INSTALL
$ npm i -g typescript
# COMPILE
$ tsc helloworld.ts
TypeScript & Interface & Type alias
https://github.com/xgqfrms/ts/issues/6
TypeScript Types
https://www.typescriptlang.org/docs/handbook/basic-types.html
https://www.typescriptlang.org/docs/handbook/advanced-types.html
Boolean
Number
String
Array
Tuple
Enum
Any
Void
Null and Undefined
Never
Object
// Type assertions
// A note about ‘let’
Intersection Types
Union Types
Type Guards and Differentiating Types
User-Defined Type Guards
Using type predicates
Using the in operator
typeof type guards
instanceof type guards
Nullable types
Optional parameters and properties
Type guards and type assertions
Type Aliases
Interfaces vs. Type Aliases
String Literal Types
Numeric Literal Types
Enum Member Types
Discriminated Unions
Exhaustiveness checking
Polymorphic this types
Index types
Index types and index signatures
Mapped types
Inference from mapped types
Conditional Types
Distributive conditional types
Type inference in conditional types
Predefined conditional types
https://www.typescriptlang.org/docs/handbook/utility-types.html
Partial<T>
Readonly<T>
Record<K,T>
Pick<T,K>
Omit<T,K>
Exclude<T,U>
Extract<T,U>
NonNullable<T>
Parameters<T>
ConstructorParameters<T>
ReturnType<T>
InstanceType<T>
Required<T>
ThisParameterType
OmitThisParameter
ThisType<T>
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
最新文章
- 安装lxml时gcc: internal compiler error: Killed (program cc1)的解决方法
- C# 匿名函数 详解
- windows核心编程---第五章 线程的基础
- CSS:CSS定位和浮动
- 【WCF 1】WCF框架宏观了解
- java开发--反射技术
- Java 碰撞的球 MovingBall (整理)
- 桂电在线-转变成bootstrap版2(记录学习bootstrap)
- android 管理Bitmap内存 - 开发文档翻译
- C#方法同步 [MethodImpl(MethodImplOptions.Synchronized)]
- Python数据处理——numpy_3
- Windows Server 2016-命令行Ntdsutil迁移FSMO角色
- 1.4 random模块
- 敏捷冲刺每日报告——Day5
- 关于自定义view--实现自定义水波纹效果
- redis持久化AOF与RDB
- Flutter 即学即用系列博客——02 一个纯 Flutter Demo 说明
- window mysql安装
- Java线程池应用及原理分析(JDK1.8)
- 【转】GDB中应该知道的几个调试方法