typescript variable multiple types 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;
}