2011-12-17 87 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>} */