How to get the properties and methods of a single type when using union type on a variable in TypeScript?
Originally Published Here ๐!
In TypeScript, a Union Type is made by combining more than one type. So to access or get the properties and method of a single type when using union type on a variable, we have to narrow the variable type we need using a...
melvingeorge-me.hashnode.dev4 min read