Is it possible to map a string to a function using TS. For example :
this.keyBinding = new Map<string, Function>();
this.keyBinding
.set('Backspace', this.handleBackspace)
.set('Delete', this.handleDelete)
I tried to execute it using:
this.keyBinding.get('Backspace');
but nothing happens.