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:
didinele
2019-04-23 19:47:42 +03:00
committed by SpaceEEC
parent 23e6414420
commit 3f6d08a499

4
typings/index.d.ts vendored
View File

@@ -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;