mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 17:21:31 +00:00
fix(docs): remove duplicated Collection#findAll docstring
Also added intended @ deprecated decorators
This commit is contained in:
parent
6070b22382
commit
f921261f3f
1 changed files with 3 additions and 10 deletions
|
|
@ -164,6 +164,7 @@ class Collection extends Map {
|
||||||
* @param {string} prop The property to test against
|
* @param {string} prop The property to test against
|
||||||
* @param {*} value The expected value
|
* @param {*} value The expected value
|
||||||
* @returns {Array}
|
* @returns {Array}
|
||||||
|
* @deprecated
|
||||||
* @example
|
* @example
|
||||||
* collection.findAll('username', 'Bob');
|
* collection.findAll('username', 'Bob');
|
||||||
*/
|
*/
|
||||||
|
|
@ -248,6 +249,7 @@ class Collection extends Map {
|
||||||
* @param {string} prop The property to test against
|
* @param {string} prop The property to test against
|
||||||
* @param {*} value The expected value
|
* @param {*} value The expected value
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
|
* @deprecated
|
||||||
* @example
|
* @example
|
||||||
* if (collection.exists('username', 'Bob')) {
|
* if (collection.exists('username', 'Bob')) {
|
||||||
* console.log('user here!');
|
* console.log('user here!');
|
||||||
|
|
@ -295,6 +297,7 @@ class Collection extends Map {
|
||||||
* @param {Function} fn Function used to test (should return a boolean)
|
* @param {Function} fn Function used to test (should return a boolean)
|
||||||
* @param {Object} [thisArg] Value to use as `this` when executing function
|
* @param {Object} [thisArg] Value to use as `this` when executing function
|
||||||
* @returns {Array}
|
* @returns {Array}
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
filterArray(fn, thisArg) {
|
filterArray(fn, thisArg) {
|
||||||
if (thisArg) fn = fn.bind(thisArg);
|
if (thisArg) fn = fn.bind(thisArg);
|
||||||
|
|
@ -460,16 +463,6 @@ class Collection extends Map {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Searches for all items where their specified property's value is identical to the given value
|
|
||||||
* (`item[prop] === value`).
|
|
||||||
* @param {string} prop The property to test against
|
|
||||||
* @param {*} value The expected value
|
|
||||||
* @returns {Array}
|
|
||||||
* @deprecated
|
|
||||||
* @example
|
|
||||||
* collection.findAll('username', 'Bob');
|
|
||||||
*/
|
|
||||||
Collection.prototype.findAll =
|
Collection.prototype.findAll =
|
||||||
util.deprecate(Collection.prototype.findAll, 'Collection#findAll: use Collection#filter instead');
|
util.deprecate(Collection.prototype.findAll, 'Collection#findAll: use Collection#filter instead');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue