let a = {
a: () => 1,
b: () => 2,
}
let d = {
a: 'a',
b: 'b',
}
let dd = a[d.a]()
Как это разрешить?
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ a: () => number; b: () => number; }'. No index signature with a parameter of type 'string' was found on type '{ a: () => number; b: () => number; }'.