@discordjs/collection
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -199,3 +199,3 @@ export interface CollectionConstructor { | ||
*/ | ||
reduce<T>(fn: (accumulator: any, value: V, key: K, collection: this) => T, initialValue?: T): T; | ||
reduce<T>(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T; | ||
/** | ||
@@ -202,0 +202,0 @@ * Identical to |
@@ -332,2 +332,2 @@ "use strict"; | ||
module.exports = Collection; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFRQTs7OztHQUlHO0FBQ0gsTUFBTSxVQUFpQixTQUFRLEdBQVM7SUFNdkMsWUFBbUIsT0FBK0M7UUFDakUsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBRWY7Ozs7O1dBS0c7UUFDSCxNQUFNLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxRQUFRLEVBQUUsRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxJQUFJLEVBQUUsWUFBWSxFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7UUFFM0Y7Ozs7O1dBS0c7UUFDSCxNQUFNLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxXQUFXLEVBQUUsRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxJQUFJLEVBQUUsWUFBWSxFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7SUFDL0YsQ0FBQztJQUVNLEdBQUcsQ0FBQyxHQUFNLEVBQUUsS0FBUTtRQUMxQixJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQztRQUNuQixJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQztRQUN0QixPQUFPLEtBQUssQ0FBQyxHQUFHL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iBhcyB1bmtub3duIGFzIENvbGxlY3Rpb25Db25zdHJ1Y3Rvcjtcblx0fVxufVxuXG5leHBvcnQgeyBDb2xsZWN0aW9uIH07XG5leHBvcnQgZGVmYXVsdCBDb2xsZWN0aW9uO1xubW9kdWxlLmV4cG9ydHMgPSBDb2xsZWN0aW9uO1xuIl19 |
{ | ||
"name": "@discordjs/collection", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Utility data structure used in Discord.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85229