From b3060ea229e5a5395f7fb67291ead0440e6c55ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rom=C3=A1n?= Date: Mon, 20 May 2019 20:49:28 +0200 Subject: [PATCH] typings(Collection): use T in accumulator and initialValue when reducing (#3284) This brings some consistency with Array#reduce's typings and to reality. --- typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 18575b304..c98e7a16c 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -311,7 +311,7 @@ declare module 'discord.js' { public random(count: number): V[]; public randomKey(): K | undefined; public randomKey(count: number): K[]; - public reduce(fn: (accumulator: any, value: V, key: K, collection: Collection) => T, initialValue?: any): T; + public reduce(fn: (accumulator: T, value: V, key: K, collection: Collection) => T, initialValue?: T): T; public some(fn: (value: V, key: K, collection: Collection) => boolean, thisArg?: any): boolean; public sort(compareFunction?: (a: V, b: V, c?: K, d?: K) => number): Collection; public sweep(fn: (value: V, key: K, collection: Collection) => boolean, thisArg?: any): number;