(notif: Notification)
| 8 | import { isInProcessTeammateTask } from '../../tasks/InProcessTeammateTask/types.js' |
| 9 | |
| 10 | function parseCount(notif: Notification): number { |
| 11 | if (!('text' in notif)) { |
| 12 | return 1 |
| 13 | } |
| 14 | const match = notif.text.match(/^(\d+)/) |
| 15 | return match?.[1] ? parseInt(match[1], 10) : 1 |
| 16 | } |
| 17 | |
| 18 | function foldSpawn(acc: Notification, _incoming: Notification): Notification { |
| 19 | return makeSpawnNotif(parseCount(acc) + 1) |
no outgoing calls
no test coverage detected