![javascript - Typescript: `let result: { [key: T[K]]: T } = {};` is not working, how can I type my object based on generics? - Stack Overflow javascript - Typescript: `let result: { [key: T[K]]: T } = {};` is not working, how can I type my object based on generics? - Stack Overflow](https://i.stack.imgur.com/T62gB.png)
javascript - Typescript: `let result: { [key: T[K]]: T } = {};` is not working, how can I type my object based on generics? - Stack Overflow
![TypeScript advanced types. Diving a little deeper into typescript… | by healqq | shyftplan TechBlog | Medium TypeScript advanced types. Diving a little deeper into typescript… | by healqq | shyftplan TechBlog | Medium](https://miro.medium.com/v2/resize:fit:1018/1*Rvd12tMkaInUXylcxBDFnw.png)
TypeScript advanced types. Diving a little deeper into typescript… | by healqq | shyftplan TechBlog | Medium
![The keyof operator in TypeScript. The keyof operator in TypeScript is… | by Anisha Dahal | wesionaryTEAM The keyof operator in TypeScript. The keyof operator in TypeScript is… | by Anisha Dahal | wesionaryTEAM](https://miro.medium.com/v2/resize:fit:888/1*fPRJaoAiXfIhJrBkjfONhg.png)