139
rated 0 times
[
144]
[
5]
/ answers: 1 / hits: 43983
/ 8 Years ago, wed, june 22, 2016, 12:00:00
I am trying to create a type for an Object. But can't seem to get it right. This is what I have.
private test:Object<Test>;
this.test = {id : 'test'};
interface Test
{
id : string;
}
This doesn't work. This gives me the following error:
Type Object Is Not Generic
What is the right way (syntax) to create types for Objects like this?
More From » typescript