TypeScript compiler crashes when assigning literal empty string as dictionary key

Topics: General
Aug 16, 2013 at 5:55 PM
The following crashes the TypeScript compiler (0.9.1) irrespective of ES5/ES3/CommonJS/AMD:
interface Tests {
    [testName: string]: (test: string) => void
}

var tests: Tests = {};

tests[''] = function(test: string): void {
}
Specifying a non-empty string for the key does not cause a crash.
Coordinator
Aug 16, 2013 at 9:44 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.