Here is an example of how I have defined an interface:
export interface Donor{
donorName: string;
donorId: string;
donorPassword:string
donorAge: number
fitnessReport: string
physicianApproval: string
}
In the following class, I want to use a variable of type 'Donor' as a private attribute:
class SawtoothService {
//Donor component
private currentDonor: <Donor>;
public setDonor(currentDonor) {
this.currentDonor = currentDonor;
}
}
I will set it to a specific implementation by calling the function setDonor.
However, there seems to be an error in this line:
private currentDonor: <Donor>;