My question might be stupid, but i would like to get some clarity on this. As per my understanding, in angular we use interface to give idea about the data structure. So suppose we have an array of data of persons, we create an interface like
export interface Person {
name: string;
age: string
}
And we can directly import this to our ts file and assign the type like
export class ComponentName implements OnInit {
data: Person[];
constructor() {}
ngOnInIt(){}
}
I totally understand this. But my confusion is, when do we 'implement' interface. I saw examples like
export class ComponentName implements OnInit, Person {
data: Person[];
constructor() {}
ngOnInIt(){}
}
Any help would be appreciatable. Thank you