ask
ask<
TReq,TRes>(target,message,timeoutMs?):Promise<TRes>
Defined in: src/Ask.ts:15
Request/response pattern. Sends message to target, attaching a
temporary sender ref. The returned Promise resolves with the first reply
or rejects with AskTimeoutError after timeoutMs.
Inside the recipient, reply with context.sender?.tell(response).
Tip: a recipient can reject an ask by replying with an Error instance.
Type Parameters
Section titled “Type Parameters”TReq
TRes = unknown
Parameters
Section titled “Parameters”target
Section titled “target”ActorRef<TReq>
message
Section titled “message”TReq
timeoutMs?
Section titled “timeoutMs?”number = 5_000
Returns
Section titled “Returns”Promise<TRes>