Package: effect
Module: BigDecimal
Returns true if the first argument is greater than the second, otherwise false.
When to use
Use to test whether one BigDecimal is strictly greater than another.
Example (Checking greater-than comparisons)
import { BigDecimal } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(
BigDecimal.isGreaterThan(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
false
)
assert.deepStrictEqual(
BigDecimal.isGreaterThan(BigDecimal.fromStringUnsafe("3"), BigDecimal.fromStringUnsafe("3")),
false
)
assert.deepStrictEqual(
BigDecimal.isGreaterThan(BigDecimal.fromStringUnsafe("4"), BigDecimal.fromStringUnsafe("3")),
true
)
Signature
declare const isGreaterThan: { (that: BigDecimal): (self: BigDecimal) => boolean; (self: BigDecimal, that: BigDecimal): boolean; }
Since v4.0.0