When I declared the type:
export interface Type{
id: number;
name: string;
}
I attempted to iterate over an array of this type:
for(var t of types) // types = Type[]
{
console.log(t.id);
}
However, I encountered the following error message:
D:/Google/services/test.service.ts (33,20): Property 'id' does not exist on type 'Type'.