When creating an interface, I want to have a mix of known variables and dynamic variables.
Consider this initial interface definition:
export interface ApplicationData {
applicant?: ApplicantData;
application_unit?: ApplicationUnit;
interested_people_count?: number | undefined;
}
Now, how can I add the following variables to this interface as well:
interested_person_1: InterestedPerson;
interested_person_3: InterestedPerson;
expenses_1q_2023: Expenses;
expenses_3q_2022: Expenses;
I am uncertain of the exact number of these variables, but I do know that any variable starting with 'interested_person_' should be of type InterestedPerson interface, and any variable starting with 'expenses_' should be of type Expenses interface.