( attribution: AttributionState, saveSnapshot: (snapshot: AttributionSnapshotMessage) => void, )
| 889 | * @returns New attribution state with incremented promptCount |
| 890 | */ |
| 891 | export function incrementPromptCount( |
| 892 | attribution: AttributionState, |
| 893 | saveSnapshot: (snapshot: AttributionSnapshotMessage) => void, |
| 894 | ): AttributionState { |
| 895 | const newAttribution = { |
| 896 | ...attribution, |
| 897 | promptCount: attribution.promptCount + 1, |
| 898 | } |
| 899 | const snapshot = stateToSnapshotMessage(newAttribution, randomUUID()) |
| 900 | saveSnapshot(snapshot) |
| 901 | return newAttribution |
| 902 | } |
no test coverage detected