This commit is contained in:
parent
8d94bc5498
commit
c7c7afe578
1 changed files with 5 additions and 1 deletions
|
|
@ -1504,7 +1504,11 @@ export class MTPClient<Registry extends MTPSchemaRegistry = MTPNoSchemas> {
|
|||
): Unsubscribe;
|
||||
subscribe(
|
||||
type: MTPCommunicationType,
|
||||
handler: (message: MTPFrame<unknown>) => void | Promise<void>,
|
||||
handler: (message: ParsedFrame) => void | Promise<void>,
|
||||
): Unsubscribe;
|
||||
subscribe(
|
||||
type: MTPCommunicationType,
|
||||
handler: (message: any) => void | Promise<void>,
|
||||
): Unsubscribe {
|
||||
if (typeof type !== "string" || !type) {
|
||||
throw new TypeError("subscription type must be a non-empty string");
|
||||
|
|
|
|||
Loading…
Reference in a new issue