Skip to content

Commit

Permalink
fix: added type
Browse files Browse the repository at this point in the history
  • Loading branch information
mishramonalisha76 committed Nov 6, 2024
1 parent d233844 commit 0151607
Show file tree
Hide file tree
Showing 8 changed files with 23,438 additions and 33,338 deletions.
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

echo "\nRunning GIT hooks..."
yarn cleanbuild
#yarn nx affected --target=lint
#yarn nx affected --target=test
yarn nx affected --target=lint
yarn nx affected --target=test
14 changes: 12 additions & 2 deletions packages/restapi/src/lib/pushstream/PushStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ export class PushStream extends EventEmitter {
'RestAPI::PushStream::connect - Emitted STREAM.CONNECT'
);
resolve();
} else {
console.log('RestAPI::PushStream::s-7');
}
};

Expand Down Expand Up @@ -331,11 +333,14 @@ export class PushStream extends EventEmitter {
};

if (this.pushChatSocket) {
console.log('RestAPI::PushStream::s-1');
this.pushChatSocket.off(EVENTS.CONNECT);
this.pushChatSocket.on(EVENTS.CONNECT, async () => {
console.log('RestAPI::PushStream::s-2');
isChatSocketConnected = true;
this.chatSocketCount++;
this.chatSocketConnected = true;
console.log('RestAPI::PushStream::s-3');
checkAndEmitConnectEvent();
console.log(
`RestAPI::PushStream::EVENTS.CONNECT::Chat Socket Connected (ID: ${this.pushChatSocket.id})`
Expand All @@ -344,6 +349,7 @@ export class PushStream extends EventEmitter {

this.pushChatSocket.off(EVENTS.DISCONNECT);
this.pushChatSocket.on(EVENTS.DISCONNECT, async () => {
console.log('RestAPI::PushStream::s-4');
console.log(
'RestAPI::PushStream::ChatSocket::Disconnect - Chat socket disconnected.'
);
Expand Down Expand Up @@ -502,6 +508,8 @@ export class PushStream extends EventEmitter {
if (this.pushNotificationSocket) {
this.pushNotificationSocket.off(EVENTS.CONNECT);
this.pushNotificationSocket.on(EVENTS.CONNECT, async () => {
console.log('RestAPI::PushStream::s-5');

console.log(
`RestAPI::PushStream::NotifSocket::Connect - Notification Socket Connected (ID: ${this.pushNotificationSocket.id})`
);
Expand All @@ -513,6 +521,8 @@ export class PushStream extends EventEmitter {

this.pushNotificationSocket.off(EVENTS.DISCONNECT);
this.pushNotificationSocket.on(EVENTS.DISCONNECT, async () => {
console.log('RestAPI::PushStream::s-6');

console.log(
'RestAPI::PushStream::NotifSocket::Disconnect - Notification socket disconnected.'
);
Expand Down Expand Up @@ -627,10 +637,10 @@ export class PushStream extends EventEmitter {
}
}

public info() {
public info(): { options: PushStreamInitializeProps; listen: STREAM[] } {
return {
options: this.options,
listen: this.listen,
listen: this.listen as STREAM[],
};
}

Expand Down
Loading

0 comments on commit 0151607

Please sign in to comment.