diff --git a/content/en/howto-es2015-modules.md b/content/en/howto-es2015-modules.md index 274b7839..0d759731 100644 --- a/content/en/howto-es2015-modules.md +++ b/content/en/howto-es2015-modules.md @@ -75,7 +75,7 @@ export { * Get the red, green, and blue values of a color. * @function * @param {string} color - A color, in hexadecimal format. - * @returns {Array.<number>} An array of the red, green, and blue values, + * @returns {Array<number>} An array of the red, green, and blue values, * each ranging from 0 to 255. */ rgbify as toRgb diff --git a/content/en/tags-type.md b/content/en/tags-type.md index 3c6cace4..f663ab2c 100644 --- a/content/en/tags-type.md +++ b/content/en/tags-type.md @@ -84,14 +84,14 @@ documented. </td> <td> {% example "An array of MyClass instances." %} -<pre class="prettyprint"><code>{Array.<MyClass>} +<pre class="prettyprint"><code>{Array<MyClass>} // or: {MyClass[]} </code></pre> {% endexample %} {% example "An object with string keys and number values:" %} -<pre class="prettyprint"><code>{Object.<string, number>} +<pre class="prettyprint"><code>{Object<string, number>} </code></pre> {% endexample %} @@ -107,7 +107,11 @@ documented. </td> <td><p> JSDoc supports Closure Compiler's syntax for defining array and object types. + </p> <p> + The trailing period on an object type is supported, but not required (e.g., + <code>Array.<string></code>). + </p> <p> You can also indicate an array by appending <code>[]</code> to the type that is contained in the array. For example, the expression <code>string[]</code> indicates an array of strings. @@ -272,7 +276,7 @@ var props; {% example "Example" %} ```js -/** @type {(string|Array.<string>)} */ +/** @type {(string|Array<string>)} */ var foo; /** @type {number} */ var bar = 1;