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