Introduction
These notes should help in better understanding TypeScript and might be helpful when needing to lookup up how leverage Type...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks for the writeup! There are two spots where I got stuck and I think they are related.
1.
2.
In 1. I got confused by the
[keyof Type]
at the end of the expression; how does it work?In 2. I got confused by having the same type variable
U
used twice in different spots returning different values.There is some form of relationship-forming happening where I can‘t follow because I don‘t know how the compiler works out a solution. Could you expand a bit on this and maybe show step by step how the compiler arrives at a solution? Now that I think of this I believe that understanding this is fundamental to getting how the whole type system works 🤔
Thanks for the feedback!
Will try to update the post with further explanations.
This is so helpful, thank you!
Nice article. Thank you very much. Really want to know about pre-defined type more.