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'`.
This commit is contained in:
March 7th 2022-07-11 15:07:12 +07:00
parent b1257bc62d
commit ec809a0f95

3
typings/index.d.ts vendored
View File

@ -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<void>): this;
}