My current array of objects looks like this:
export const EXAMPLE_CONFIG: IExampleConfig = [
{
urlPath: '/test/test',
page: 'test',
fields: {
fullName: 'a',
mobilePhoneNumber: 'b',
emailAddress: 'c',
.......
}
},
{
... same as above
},
]
I've defined an interface as follows:
export interface IExampleConfig {
path: string;
pageTitle: string;
fields: { [key: string]: string };
}
An error is being returned: Type '({ path: string; pageTitle: string; fields: { fullName: string; mobilePhoneNumber: string; emailAddress: string; emailIsOwn: string; mediasource: string; }; } | { path: string; pageTitle: string; fields: { ...; }; } | ... 7 more ... | { ...; })[]' is missing the following properties from type 'IExampleConfig': path, pageTitle, fields.