Javascript 如何在google闭包中注释哈希?
演示了如何注释记录:Javascript 如何在google闭包中注释哈希?,javascript,annotations,google-closure,Javascript,Annotations,Google Closure,演示了如何注释记录: {{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. 我有一个任意字符串到数字的散列。不清楚我是如何指出这一点的,因为在示例中,左侧两次都是一个特定的属性名称。我应该如何注释我的散列?/
{{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.
我有一个任意字符串到数字的散列。不清楚我是如何指出这一点的,因为在示例中,左侧两次都是一个特定的属性名称。我应该如何注释我的散列?/**@type{Object.}*/
/** @type {Object.<number>} */
或
/**@type{Object.}*/
/** @type {Object.<string, number>} */