The type bound for fn in register has a void return type:
|
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:
|
response = await this.namespaces[ns].rpc_methods[message.method] |
|
.fn(message.params, socket_id) |
The type bound for
fninregisterhas avoidreturn type:rpc-websockets/src/lib/server.ts
Line 147 in 46b0190
I'm rather new to TypeScript, but I would suggest a return type of
unknown | Promise<unknown>to hint that the function isawait'd later on:rpc-websockets/src/lib/server.ts
Lines 697 to 698 in 46b0190