interface State {
customerId: number,
step: string
}
const data: State = {
step: 'shipping',
customerId: 123
}
const setData = (key: string, value: number) => {
data[key] = value
}
setData('customerId', 555)
Im try change value of customerId but got error: No index signature with a parameter of type 'string' was found on type 'State'.
How i can set new value?