Having a *.d.ts file with the following definition:
class StateManager {
states(key:string): Phaser.State;
Can be accessed in two ways:
myStateManager.states[key]
myStateManager.states(key)
But only the first will actually work due to the JS definition of states:
this.states = {};
Is there a way to force the correct notation in typescript?