Constructs a realized-PnL outcome.
Pass either a computed pnl or a haltReason created by a
PnlHaltReason factory.
Throws TypeError unless exactly one of pnl and haltReason is
present.
Optionalpnl: null | PnlOutcomeAmountOptionalhalt_reason: null | PnlHaltReasonReadonlyhaltThe reason why PnL could not be calculated, or undefined when it is
available.
ReadonlyisWhether this accumulator halted during the operation.
ReadonlyokWhether this outcome contains authoritative PnL.
ReadonlypnlThe computed PnL, or undefined when a halt reason is present.
Returns a deep copy of this PnL outcome.
Realized-PnL result: either the amount or a halt reason.
Exactly one of
pnlandhaltReasonis present.