Home > @imqueue/rpc > imqCallResolver
imqCallResolver() function
Builds a call resolver that resolves the pending promise and then runs the optional after-call hook.
Signature:
export declare function imqCallResolver(resolve: (data: any) => void, req: IMQRPCRequest, client: IMQClient): (data: any, res: IMQRPCResponse) => void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
resolve |
(data: any) => void |
the underlying promise resolver |
|
req |
the originating request message | |
|
client |
the client the call belongs to {(data: any, res: IMQRPCResponse) => void} - a hook-aware resolver |
Returns:
(data: any, res: IMQRPCResponse) => void