I have this TS code and am confused on the last bit of it:
type LookUp<U extends {type: PropertyKey}, T extends PropertyKey> = {
[P in T] : U extends {type: T}
? U
: never
}[T] //What does this do?
This code is from the challenge: https://github.com/type-challenges/type-challenges/blob/main/questions/00062-medium-type-lookup/README.md