I have an interface.
interface ICalculateFieldProps {
fields: string[]
set: string
updateFunc: (valuesObj: object, oldValue: any) => any
}
I want valuesObj keys to be limited to fields: string[] items.
So for example, if pass ['width', 'height'] to fields.
Then valuesObj must be
{
height: any
width: any
}