(markEntries: MarkEntry[])
| 253 | } |
| 254 | |
| 255 | private calculateMarks(markEntries: MarkEntry[]) { |
| 256 | // Only swap has sources as a "that" mark |
| 257 | const thatMark = |
| 258 | this.type === "swap" |
| 259 | ? markEntries |
| 260 | : markEntries.filter(({ isSource }) => !isSource); |
| 261 | |
| 262 | // Only swap doesn't have a source mark |
| 263 | const sourceMark = |
| 264 | this.type === "swap" |
| 265 | ? [] |
| 266 | : markEntries.filter(({ isSource }) => isSource); |
| 267 | |
| 268 | return { thatMark, sourceMark }; |
| 269 | } |
| 270 | |
| 271 | async run([sources, destinations]: [ |
| 272 | TypedSelection[], |