let myVar : string | number; //Variable with union type declaration
myVar = 100; //OK
myVar = 'Lokesh'; //OK
myVar = true; //Error - boolean not allowed
let myVar : string | number; //myVar can store string and number types
class types {Foo: typeof Foo; Bar: typeof Bar;};
type myUnion = typeof types[keyof typeof types];