Files
JiboOs/docs/bt/decorators/WhileCondition.js
2026-03-16 13:53:01 +02:00

17 lines
771 B
JavaScript

/**
* @callback jibo.bt.decorators.WhileCondition~Conditional
* @returns {boolean} `true` when you want component to restart.
*/
/**
* @class WhileCondition
* @extends jibo.bt.Decorator
* @memberof jibo.bt.decorators
* @description When `WhileCondition`'s component succeeds, `WhileCondition`
* will evaluate its conditional. If it evaluates to `true`, `WhileCondition` will
* start its component again. If the conditional evaluates to `false`, `WhileCondition`
* returns the status of its component.
* @param {Object} options See {@link jibo.bt.Decorator|Decorator} for all options.
* @param {Function} [options.init] - Initialization function.
* @param {jibo.bt.decorators.WhileCondition~Conditional} options.conditional - The conditional to evaluate.
*/