What I wanna do is so simple.
In the example below,
interface InterfaceA { a: string, b: number }
interface InterfaceB { c: keyof InterfaceA }
const testMethod = (test: InterfaceB) => {
const TestObject: InterfaceA = { a: '', b: 1 }
TestObject[test.c] =
}
causes 'Type 'any' is not assignable to type 'never'' error.
I thought that test.c can be assigned in TestObject since c is the key of Interface A.
How can I make things work?