assign two types in typescript for a varibale code example
Example: typescript assign two types
// refered to as union types in typescript
interface Foo {
bar:string|boolean;
}
// refered to as union types in typescript
interface Foo {
bar:string|boolean;
}