Can the scenario below be achieved?
type test = <T extends string>(key: T, object: { [`${T}`]: number }) => void
^^^^^^^^
I am aware that we can assign type literal values using that syntax, but after some experimentation, it seems that setting keys in the same way is not possible.
Nevertheless, theoretically, I believe it should be achievable given that mapped keys using as
are feasible...
Does anyone have any insights into this?