Dotted property for types with string index signatures

Types with a string index signature can be indexed using the [] notation, but were not allowed to use the .. Starting with TypeScript 2.2 using either should be allowed.

  1. interface StringMap<T> {
  2. [x: string]: T;
  3. }
  4. const map: StringMap<number>;
  5. map["prop1"] = 1;
  6. map.prop2 = 2;

This only apply to types with an explicit string index signature. It is still an error to access unknown properties on a type using . notation.