Originally Published Here ๐! To narrow down the properties and methods of an object with union type we can use the in operator in TypeScript. TL;DR // Editor type type Editor = { name: string; }; // Admin type type Admin = { name: string; rol...

No responses yet.