I'm using react with typescript and I have this:
interface SomeProps {
stuff: {
optionalStuff?: object[];
}[];
}
The only problem with this approach is that if I try to insert any property besides optionalStuff inside the stuff object[], it will fail because those properties are not listed.
How can I do something like:
interface SomeProps {
stuff: {
ACCEPTS_ANY_GENERIC_STUFF_INSIDE: string | number | object | undefined
optionalStuff?: object[];
}[];
}