(op: OrderRelationOperator, rval: unknown)
| 121 | private _rvalFloat: number; |
| 122 | private _opFn: (lval: unknown, rval: unknown) => boolean; |
| 123 | constructor(op: OrderRelationOperator, rval: unknown) { |
| 124 | if (!isNumber(rval)) { |
| 125 | let errMsg = ''; |
| 126 | if (__DEV__) { |
| 127 | errMsg = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'; |
| 128 | } |
| 129 | throwError(errMsg); |
| 130 | } |
| 131 | this._opFn = ORDER_COMPARISON_OP_MAP[op]; |
| 132 | this._rvalFloat = numericToNumber(rval); |
| 133 | } |
| 134 | // Performance sensitive. |
| 135 | evaluate(lval: unknown): boolean { |
| 136 | // Most cases is 'number', and typeof maybe 10 times faseter than parseFloat. |
nothing calls this directly
no test coverage detected