mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
fix(typings): Collection#find & findKey can return undefined (#3228)
* fix(typings): [Collection#find](https://github.com/didinele/discord.js/blob/master/src/util/Collection.js#L172) can also return undefined * same thing for findKey
This commit is contained in:
4
typings/index.d.ts
vendored
4
typings/index.d.ts
vendored
@@ -294,8 +294,8 @@ declare module 'discord.js' {
|
||||
public equals(collection: Collection<any, any>): boolean;
|
||||
public every(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): boolean;
|
||||
public filter(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): Collection<K, V>;
|
||||
public find(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): V;
|
||||
public findKey(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): K;
|
||||
public find(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): V | undefined;
|
||||
public findKey(fn: (value: V, key: K, collection: Collection<K, V>) => boolean, thisArg?: any): K | undefined;
|
||||
public first(): V | undefined;
|
||||
public first(count: number): V[];
|
||||
public firstKey(): K | undefined;
|
||||
|
||||
Reference in New Issue
Block a user