In Typescript, you'd just do this:
class Test {
[key: string]: whatever
}
Which allows you to access computed property names like so...
class Test {
getProp(key) {
return this[key]
}
}
... without receiving Element implicitly has an 'any' type because type 'Test' has no index signature.
I can't figure out how to accomplish the equivalent with JSDoc. Anyone had any luck with this?