xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

TypeScript Type Manipulation All In One

TypeScript Type Manipulation All In One

Creating Types from Types

Generics
Keyof Type Operator
Typeof Type Operator
Indexed Access Types
Conditional Types
Mapped Types
Template Literal Types

https://www.typescriptlang.org/docs/handbook/2/types-from-types.html

Generics


https://www.typescriptlang.org/docs/handbook/2/generics.html

Keyof Type Operator

<T> / <Type>


https://www.typescriptlang.org/docs/handbook/2/keyof-types.html

Typeof Type Operator


https://www.typescriptlang.org/docs/handbook/2/typeof-types.html

Indexed Access Types


https://www.typescriptlang.org/docs/handbook/2/indexed-access-types.html

Conditional Types


infer

// 在条件类型中使用泛型的方式是 `infer`


https://www.typescriptlang.org/docs/handbook/2/conditional-types.html

Mapped Types


https://www.typescriptlang.org/docs/handbook/2/mapped-types.html

Template Literal Types


https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html

refs

infer

https://github.com/xgqfrms/learn-typescript-by-practice/issues/21

https://www.cnblogs.com/xgqfrms/p/16793600.html

次贷危机

https://youtu.be/JhSKLEkrV0c?t=888



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-10-16 14:14  xgqfrms  阅读(14)  评论(1编辑  收藏  举报