(changes: SnapshotAction<T>[], prevKey?: string)
| 27 | } |
| 28 | |
| 29 | function positionAfter<T>(changes: SnapshotAction<T>[], prevKey?: string) { |
| 30 | if (isNil(prevKey)) { |
| 31 | return 0; |
| 32 | } else { |
| 33 | const i = positionFor(changes, prevKey); |
| 34 | if (i === -1) { |
| 35 | return changes.length; |
| 36 | } else { |
| 37 | return i + 1; |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | function buildView(current, action) { |
| 43 | const { payload, prevKey, key } = action; |
no test coverage detected