You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the rawbuffer option in the client, the emit function should also support the emit(value: any) signature. Currently, the type definition only provides emit(event: string, value?: any): Client;. This causes type errors when trying to use the emit function with only a value argument in TypeScript.
Expected Behavior
The type definition for the emit function should include both:
emit(event: string, value?: any): Client;
emit(value: any): Client;
Steps to Reproduce
Set up a TypeScript project with the node-ipc library.
Configure a client to use the rawbuffer option with the following code:
@RIAEvangelist Yes, it is in the @types/node-ipc package. I thought you would also maintain that one, but I now see that is maintained by other people.
Thanks for your quick reply, and I closed the issue because the problem should be solved elsewhere.
Description
When using the
rawbuffer
option in the client, theemit
function should also support theemit(value: any)
signature. Currently, the type definition only providesemit(event: string, value?: any): Client;
. This causes type errors when trying to use theemit
function with only a value argument in TypeScript.Expected Behavior
The type definition for the
emit
function should include both:emit(event: string, value?: any): Client;
emit(value: any): Client;
Steps to Reproduce
node-ipc
library.rawbuffer
option with the following code:emit
function with only a value argument.The text was updated successfully, but these errors were encountered: