Having difficulty creating an object from a model in TypeScript.
export interface ICompliance {
id?: number;
notes?: any;
dueDate?: Moment;
type?: ComplianceType;
createdBy?: string;
updatedBy?: string;
updatedAt?: Moment;
createdAt?: Moment;
file?: IFile;
project?: IProject;
}
export class Compliance implements ICompliance {
constructor(
public id?: number,
public notes?: any,
public dueDate?: Moment,
public type?: ComplianceType,
public createdBy?: string,
public updatedBy?: string,
public updatedAt?: Moment,
public createdAt?: Moment,
public file?: IFile,
public project?: IProject
) {}
}
New to TypeScript and looking for guidance on creating an object from a model. Any advice would be appreciated. Thank you.