The Interface:
export interface IAddEditGeneralDictionary {
Code: string;
StartDate?: Date | string;
FinishDate?: Date | string;
Name: string;
}
The Realization:
export class AddEditGeneralDictionary implements IAddEditGeneralDictionary {
constructor(public Code: string,
public StartDate: Date | string,
public FinishDate: Date | string,
public Name: string){
}
My attempt to make properties private and utilize set/get
was hindered by the restrictions of the interface.
What are your thoughts on using an interface to construct a model class?