mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
typings(Collection): use T in accumulator and initialValue when reducing (#3284)
This brings some consistency with Array#reduce's typings and to reality.
This commit is contained in:
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -311,7 +311,7 @@ declare module 'discord.js' {
|
|||||||
public random(count: number): V[];
|
public random(count: number): V[];
|
||||||
public randomKey(): K | undefined;
|
public randomKey(): K | undefined;
|
||||||
public randomKey(count: number): K[];
|
public randomKey(count: number): K[];
|
||||||
public reduce<T>(fn: (accumulator: any, value: V, key: K, collection: Collection<K, V>) => T, initialValue?: any): T;
|
public reduce<T>(fn: (accumulator: T, value: V, key: K, collection: Collection<K, V>) => T, initialValue?: T): T;
|
||||||
public some(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): boolean;
|
public some(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): boolean;
|
||||||
public sort(compareFunction?: (a: V, b: V, c?: K, d?: K) => number): Collection<K, V>;
|
public sort(compareFunction?: (a: V, b: V, c?: K, d?: K) => number): Collection<K, V>;
|
||||||
public sweep(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): number;
|
public sweep(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): number;
|
||||||
|
|||||||
Reference in New Issue
Block a user