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.
{Array.<MyClass>}
+{Array<MyClass>}
// or:
{MyClass[]}
{% endexample %}
{% example "An object with string keys and number values:" %}
-{Object.<string, number>}
+{Object<string, number>}
{% endexample %}
@@ -107,7 +107,11 @@ documented.
JSDoc supports Closure Compiler's syntax for defining array and object types. +
+ The trailing period on an object type is supported, but not required (e.g.,
+ Array.<string>
).
+
You can also indicate an array by appending []
to the type that is contained in the
array. For example, the expression string[]
indicates an array of strings.
@@ -272,7 +276,7 @@ var props;
{% example "Example" %}
```js
-/** @type {(string|Array.