How to make object type from another object type keys in TypeScript?
Originally Published Here ๐!
To make an object type from another object type keys, you can the in operator in combination with the keyof operator inside an Index Signature syntax in TypeScript.
TL;DR
// a simple type
type Person = {
name: string;
...
melvingeorge-me.hashnode.dev3 min read