Is something like this possible?
const propName = "x";
class A {
static propName = 1
// equivalent to static x = 1
}
A[propName] // evaluates to 1
or would it be (typeof A)[propName]?
For obvious reasons, this is not a duplicate of this question
x, just a property namedpropName. So eitherA.propNameorconst propName = "propName";static x = 1, FYI. The meaning ofstatic propName = 1does not change just because a string variablepropNameexists.