So, here I'm trying to make interface type of Object which will contain only specific interfaces in it. For example:
export interface IUser {
name: string;
last: string;
};
export interface IRoom {
users: Object<IUser>; // this is wrong.
}
I'm expecting, that users will be something like:
Users: {
'user_id_goes_here': {
name: 'John',
last: 'Doe'
},
'user_id_goes_here': {
name: 'Albert',
last: 'Einstein'
},
...
}
Is there any way to define interface member type like this?