diff --git a/types/socketcluster-client/lib/clientsocket.d.ts b/types/socketcluster-client/lib/clientsocket.d.ts index d843e8f9c7..c268364e57 100644 --- a/types/socketcluster-client/lib/clientsocket.d.ts +++ b/types/socketcluster-client/lib/clientsocket.d.ts @@ -144,7 +144,7 @@ declare class AGClientSocket extends AsyncStreamEmitter implements AGChanne isSubscribed(channelName: string, includePending?: boolean): boolean; transmitPublish(channelName: string, data: any): Promise; - invokePublish(channelName: string, data: T): Promise<{ channel: string; data: T }>; + invokePublish(channelName: string, data: any): Promise<{ channel: string; data: any }>; /* AGChannel.Client end */ @@ -175,7 +175,7 @@ declare class AGClientSocket extends AsyncStreamEmitter implements AGChanne send(data: any): void; transmit(event: string, data: any, options?: { ackTimeout?: number }): Promise; - invoke(event: string, data: T, options?: { ackTimeout?: number }): Promise; + invoke(event: string, data: any, options?: { ackTimeout?: number }): Promise; startBatch(): void; flushBatch(): void; diff --git a/types/socketcluster-client/socketcluster-client-tests.ts b/types/socketcluster-client/socketcluster-client-tests.ts index 5e9078c0f4..4cfe073107 100644 --- a/types/socketcluster-client/socketcluster-client-tests.ts +++ b/types/socketcluster-client/socketcluster-client-tests.ts @@ -10,7 +10,7 @@ const socket = create({ socket.transmit('foo', 123); (async () => { - // $ExpectType number + // $ExpectType any await socket.invoke('myProc', 123); })(); @@ -51,7 +51,7 @@ socket.transmitPublish('myChannel', 'This is a message'); // $ExpectType string response.channel; - // $ExpectType string + // $ExpectType any response.data; } catch (error) {} })();