2011-12-17 36 views
0

google closure reference演示了如何注释一段记载:如何在谷歌关闭中注释哈希?

{{myNum: number, myObject}} 
An anonymous type with both a property named myNum that has a value of type number and a property named myObject that has a value of any type. 

我有任意字符串到数字的哈希值。目前还不清楚我是如何指出这一点的,因为在这个例子中,左侧是一个特定的属性名称。我应该如何注释我的散列?

回答

2
/** @type {Object.<number>} */ 

/** @type {Object.<string, number>} */