From 3f6d08a499e93840054742de28db2783058c7104 Mon Sep 17 00:00:00 2001 From: didinele Date: Tue, 23 Apr 2019 19:47:42 +0300 Subject: [PATCH] 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 --- typings/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index f6488599d..45f2b582e 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -294,8 +294,8 @@ declare module 'discord.js' { public equals(collection: Collection): boolean; public every(fn: (value: V, key: K, collection: Collection) => boolean, thisArg?: any): boolean; public filter(fn: (value: V, key: K, collection: Collection) => boolean, thisArg?: any): Collection; - public find(fn: (value: V, key: K, collection: Collection) => boolean, thisArg?: any): V; - public findKey(fn: (value: V, key: K, collection: Collection) => boolean, thisArg?: any): K; + public find(fn: (value: V, key: K, collection: Collection) => boolean, thisArg?: any): V | undefined; + public findKey(fn: (value: V, key: K, collection: Collection) => boolean, thisArg?: any): K | undefined; public first(): V | undefined; public first(count: number): V[]; public firstKey(): K | undefined;