It adds [x: string]: any;
to any object. Why? There is no x
property on objects...
This 2nd example demonstrates a problem - when I hover over polygon
binding name in polygon.y += 5
expression, IntelliSense shows me a popup where [x: string]: any;
is located inside curly braces, so it's very easy to assume that polygon
object has x
property, doesn't it? Don't you agree that IntelliSense instead should display that [x: string]: any
thing above object definition?