From b58797e7ef9a792bbea0454f2fc8809a19534ff5 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 8 Feb 2023 20:03:04 +0300 Subject: [PATCH] feat: expand type of data in sendAction method --- src/lib/asterisk-ami-adapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/asterisk-ami-adapter.ts b/src/lib/asterisk-ami-adapter.ts index f586fdc..08ce23f 100644 --- a/src/lib/asterisk-ami-adapter.ts +++ b/src/lib/asterisk-ami-adapter.ts @@ -180,7 +180,7 @@ export class AsteriskAmiAdapter extends EventEmitter { return result; } - #send(data: Types.TAmiMessageIn, callback?: Types.TCallBack) { + #send(data: Types.TAmiMessageIn & Types.TAmiMessageToSocket, callback?: Types.TCallBack) { if (!data.ActionID) data.ActionID = this.#getFormatedUuid(); const actionID = data.ActionID; @@ -324,7 +324,7 @@ export class AsteriskAmiAdapter extends EventEmitter { getProcessData = this.#processData; - sendAction(data: Types.TAmiMessageIn, callback: Types.TCallBack) { + sendAction(data: Types.TAmiMessageIn & Types.TAmiMessageToSocket, callback: Types.TCallBack) { if (!this.#isReady) { return this.#logger.warn("Connection is not established"); }