How to make a union type from another object type in TypeScript?
Originally Published Here ๐!
To make a union type from another object's type, we can use the keyof operator followed by the object's type name in Typescript.
TL;DR
// Person type alias
type Person = {
name: string;
age: string;
salary: string;...
melvingeorge-me.hashnode.dev2 min read