(
slot: string,
value: string | undefined
)
| 1727 | dbUpdateData.processingError = updateData.processingError |
| 1728 | |
| 1729 | const convertTagValue = ( |
| 1730 | slot: string, |
| 1731 | value: string | undefined |
| 1732 | ): string | number | Date | boolean | null => { |
| 1733 | if (value === undefined || value === '') return null |
| 1734 | |
| 1735 | if (slot.startsWith('number')) { |
| 1736 | return parseNumberValue(value) |
| 1737 | } |
| 1738 | |
| 1739 | if (slot.startsWith('date')) { |
| 1740 | return parseDateValue(value) |
| 1741 | } |
| 1742 | |
| 1743 | if (slot.startsWith('boolean')) { |
| 1744 | return parseBooleanValue(value) ?? false |
| 1745 | } |
| 1746 | |
| 1747 | return value || null |
| 1748 | } |
| 1749 | |
| 1750 | type UpdateDataWithTags = typeof updateData & Record<TagSlot, string | undefined> |
| 1751 | const typedUpdateData = updateData as UpdateDataWithTags |
no test coverage detected