1interface IStudent {
2 id: string;
3 age: number;
4}
5
6interface IWorker {
7 companyId: string;
8}
9
10type IStudentAlias = IStudent;
11
12type ICustomType = IStudent | IWorker;
13
14let s: IStudentAlias = {
15 id: 'ID3241',
16 age: 2
17};
1// refered to as union types in typescript
2interface Foo {
3 bar:string|boolean;
4}