TypeScript & Advanced Types
TypeScript & Advanced Types
https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-aliases
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 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/11553285.html
未经授权禁止转载,违者必究!