Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

精读《Promise.all, Replace, Type Lookup...》 #425

Closed
ascoders opened this issue Jun 18, 2022 · 1 comment
Closed

精读《Promise.all, Replace, Type Lookup...》 #425

ascoders opened this issue Jun 18, 2022 · 1 comment

Comments

@ascoders
Copy link
Owner

ascoders commented Jun 18, 2022

精读 type-challenges Medium 9~16 题。


精读《Promise.all, Replace, Type Lookup...》

@ascoders ascoders changed the title 精读《Pop, Replace, Type Lookup...》 精读《Promise.all, Replace, Type Lookup...》 Jun 18, 2022
@waitingsong
Copy link

waitingsong commented Jun 20, 2022

不知道是 bug 还是 feature,TS 的 { [K in keyof T]: T[K] } 能同时兼容元组、数组与对象类型。

keyof T 的结果是 string | number | symbol,T[number] 自然就兼容数组了~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants