In TypeScript, what exactly is type \'{}\' and how does it relate to other built-in types?
type \'{}\'
For example, the last line of the following example gives
As far as I know, {} casts directly to a hash map like usage. You can only use keyed properties, versus the dot notation.
{}
var o:{} = {}
should be equivalent to
var o:{[key:string]:any} = {}
So
o.x = 5; //fails
But
o['x'] = 5; //succeeds