Skip to main content

Function: resolveOptionalRangeEnd()

resolveOptionalRangeEnd(start, end): number | null

Defined in: Data/Core/Types.ts:449

The write-side companion to resolveRangeEnd, for tables whose verse anchor is OPTIONAL (user_note, pinned_item, commentary_entry).

Those tables keep both range columns nullable, but only together:

(start IS NULL AND end IS NULL) OR (start IS NOT NULL AND end IS NOT NULL)

A half-populated row (start set, end NULL) is the exact shape R-1 exists to eliminate, so writers pass their start/end through here rather than emitting ?? null for each column independently.

Parameters

start

number | null | undefined

end

number | null | undefined

Returns

number | null