Skip to content

CostEstimate

CostEstimate represents a cost range with overflow-safe arithmetic helpers.

new CostEstimate(Min, Max): CostEstimate

bigint

bigint

CostEstimate

readonly Max: bigint


readonly Min: bigint

add(other): CostEstimate

add returns the sum of two cost ranges with uint64 overflow protection.

CostEstimate

CostEstimate


multiply(other): CostEstimate

multiply returns the product of two cost ranges with uint64 overflow protection.

CostEstimate

CostEstimate


multiplyByCostFactor(costPerUnit): CostEstimate

multiplyByCostFactor scales a cost range and rounds each bound up.

number

CostEstimate


union(other): CostEstimate

union returns the smallest estimate that covers both ranges.

CostEstimate

CostEstimate