From ec809a0f95cfe5a746e87f9dd8d855ccf874aae4 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Mon, 11 Jul 2022 15:07:12 +0700 Subject: [PATCH] fix(Typing): Event name ERROR: 176:13 unified-signatures This overload and the one on line 175 can be combined into one signature taking `'cancel' | 'pending'`. --- typings/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index d513724..91d7f0d 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -172,8 +172,7 @@ export abstract class DiscordAuthWebsocket extends EventEmitter { public generate_qr_code(fingerprint: string): void; public on(event: 'ready', listener: (authURL: string) => void): this; public on(event: 'success', listener: (user: RawUserData, token: string) => void): this; - public on(event: 'cancel', listener: (user: RawUserData) => void): this; - public on(event: 'pending', listener: (user: RawUserData) => void): this; + public on(event: 'cancel' | 'pending', listener: (user: RawUserData) => void): this; public on(event: 'closed', listener: (loginState: boolean) => void): this; public on(event: string, listener: (...args: any[]) => Awaitable): this; }