-
-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Description
The type bound for fn in register has a void return type:
rpc-websockets/src/lib/server.ts
Line 147 in 46b0190
| register(name: string, fn: (params: IRPCMethodParams, socket_id: string) => void, ns = "/") |
I'm rather new to TypeScript, but I would suggest a return type of unknown | Promise<unknown> to hint that the function is await'd later on:
rpc-websockets/src/lib/server.ts
Lines 697 to 698 in 46b0190
| response = await this.namespaces[ns].rpc_methods[message.method] | |
| .fn(message.params, socket_id) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels