Suppose I have an interface called ISeminar
export interface ISeminar {
id: number;
title: string;
description: string;
registrationStartDate: any;
registrationEndDate: any;
seminarStartTime?: any;
seminarEndTime?: any;
companyList?: any;
status?: Status;
}
I can create a new type for my control object by using
controls: { [key in keyof ISeminar] : FormControl};
But here, all the keys of the interface are compulsory. I want to keep to keys which are optional in the interface, optional in the control object.