mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
Make JSDocs follow general conventions (#582)
* Make JSDocs follow usual conventions * Fix StringResolvable name * Make function lowercase
This commit is contained in:
committed by
Amish Shah
parent
44efcf3f52
commit
27652b94af
@@ -62,7 +62,7 @@ class Collection extends Map {
|
||||
/**
|
||||
* The length (size) of this collection.
|
||||
* @readonly
|
||||
* @type {Number}
|
||||
* @type {number}
|
||||
*/
|
||||
get length() {
|
||||
return this.size;
|
||||
@@ -70,8 +70,8 @@ class Collection extends Map {
|
||||
|
||||
/**
|
||||
* Returns an array of items where `item[key] === value` of the collection
|
||||
* @param {String} key the key to filter by
|
||||
* @param {any} value the expected value
|
||||
* @param {string} key the key to filter by
|
||||
* @param {*} value the expected value
|
||||
* @returns {Array<Object>}
|
||||
* @example
|
||||
* collection.getAll('username', 'Bob');
|
||||
@@ -90,8 +90,8 @@ class Collection extends Map {
|
||||
|
||||
/**
|
||||
* Returns a single item where `item[key] === value`
|
||||
* @param {String} key the key to filter by
|
||||
* @param {any} value the expected value
|
||||
* @param {string} key the key to filter by
|
||||
* @param {*} value the expected value
|
||||
* @returns {Object}
|
||||
* @example
|
||||
* collection.get('id', '123123...');
|
||||
@@ -109,9 +109,9 @@ class Collection extends Map {
|
||||
|
||||
/**
|
||||
* Returns true if the collection has an item where `item[key] === value`
|
||||
* @param {String} key the key to filter by
|
||||
* @param {any} value the expected value
|
||||
* @returns {Object}
|
||||
* @param {string} key the key to filter by
|
||||
* @param {*} value the expected value
|
||||
* @returns {boolean}
|
||||
* @example
|
||||
* if (collection.exists('id', '123123...')) {
|
||||
* console.log('user here!');
|
||||
@@ -129,7 +129,7 @@ class Collection extends Map {
|
||||
* Identical to
|
||||
* [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),
|
||||
* but returns a Collection instead of an Array.
|
||||
* @param {Function} callback the callback used to filter
|
||||
* @param {function} callback the callback used to filter
|
||||
* @param {Object} [thisArg] value to set as this when filtering
|
||||
* @returns {Collection}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user