Expand description
interface PendingRule {
reply(response: Resolver, options?: ReplyOptions): RuleHandle;
replySequence(entries: readonly SequenceEntry[]): RuleHandle;
}Methods§
Source§reply(response: Resolver, options?: ReplyOptions): RuleHandle
reply(response: Resolver, options?: ReplyOptions): RuleHandle
Set the response for this rule. Accepts a static value, object, or resolver function.
Source§replySequence(entries: readonly SequenceEntry[]): RuleHandle
replySequence(entries: readonly SequenceEntry[]): RuleHandle
Set a sequence of replies. Each match advances through the array.
Returned by
when(). Call.reply()or.replySequence()on it to complete the rule.