I've been attempting to define a type for an Object, but I just can't seem to get it right. Below is what I have so far:
private myObject:Object<MyType>;
this.myObject = {id : 'test'};
interface MyType
{
id : string;
}
However, this approach isn't working as expected and it's throwing the following error:
Type Object Is Not Generic
Could someone please advise on the correct syntax for defining types for Objects in this way?