How to create custom type in Angular. can anyone please show it how to implement it at the component level? I know about the below part
type Programmer = {
name: string;
knownFor: string[];
};
const ada: Programmer = {
name: 'Ada Lovelace',
knownFor: ['Mathematics', 'Computing', 'First Programmer']
};
But how to actually create it and use it in the Angular component? Thanks.
Create custom
typeusinginterface. file nameProgrammer.ts.Programmer.ts
MyComponent
HTML