@barchart/common-js
Version:
Library of common JavaScript utilities
27 lines (26 loc) • 877 B
TypeScript
/**
* A stateful {@link Specification} that passes when the value of the data item
* crosses a value passed to the constructor. The specification will never pass
* on the first evaluation. Instead, the first data item is used to determine
* if the value is currently greater than (or less than) the threshold value
* (passed to the constructor). This determines if the passing condition means
* the value must be less than (or greater than) the threshold.
*
* @public
* @extends {Specification}
*/
export default class CrossesSpecification extends Specification {
/**
* @param {number} threshold
*/
constructor(threshold: number);
/**
* @protected
* @override
* @param {*} data
* @returns {boolean}
*/
protected override _evaluate(data: any): boolean;
#private;
}
import Specification from './Specification.js';