Skip to main content

Function: rowToHistoryEntryOrUndefined()

rowToHistoryEntryOrUndefined(row: undefined | HistoryRow): undefined | StatusHistory

Defined in: electron/services/database/utils/historyMapper.ts:257

Converts a database row to a StatusHistory object, or returns undefined if the row is not present.

Parameters

row

The database row to convert, or undefined.

undefined | HistoryRow

Returns

undefined | StatusHistory

The mapped StatusHistory object, or undefined if the row is not present.

Remarks

Useful for optional row lookups where the row may be missing.

Example

const entry = rowToHistoryEntryOrUndefined(optionalRow);