I am working with a custom type object defined as follows:
export interface IPupilFilter {
Fullname: string;
Gender: string;
ClassType: number;
Language: number;
Class: number;
ClassNumber: number;
Phone: string;
Movement: string;
}
public requestLoadPupils: IPupilFilter = <IPupilFilter>{};
As I fill out the form, this object is populated according to the defined interface.
What is the best way to reset all the value properties and set them to null?
I have attempted the following:
this.requestLoadPupils = <IPupilFilter>{} as IPupilFilter;
While I can reset each property individually like:
this.requestLoadPupils.Gender = null;
I would prefer a more efficient method.