From 1444aa5c51fbf3a162dde122567ae4a270eb5013 Mon Sep 17 00:00:00 2001 From: Justin Grant Date: Thu, 29 Jul 2021 17:20:28 -0700 Subject: [PATCH] Omit incorrect void in rename()'s Promise overload One of the TS overloaded declarations for `rename()` had a `| void` which AFAIK is incorrect. If a method returns a `Promise`, it should never be typed `| void`. --- src/collection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collection.ts b/src/collection.ts index f7d1840c3b..efb0854921 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -621,7 +621,7 @@ export class Collection { */ rename(newName: string): Promise; rename(newName: string, callback: Callback): void; - rename(newName: string, options: RenameOptions): Promise | void; + rename(newName: string, options: RenameOptions): Promise; rename(newName: string, options: RenameOptions, callback: Callback): void; rename( newName: string,