Closed
Description
class Foo {
[key: string]: any;
static BAR:string = 'bar';
static BAZ:string = 'baz';
}
console.log(Foo['BAR']);
console.log(Foo['B' + 'A' + 'Z']);
console.log(Foo['qux']);
I get the following errors with this:
tst.ts(8,13): error TS7017: Index signature of object type implicitly has an 'any' type.
tst.ts(9,13): error TS7017: Index signature of object type implicitly has an 'any' type.
I've read in the gitter archives that this should be working. Should it? How can I get a static property value using a dynamic key?