(rank: number)
| 76 | const coords = ['x', 'y', 'z', 'w', 'u', 'v']; |
| 77 | |
| 78 | function getCoords(rank: number): string { |
| 79 | if (rank === 1) { |
| 80 | return 'sourceLoc'; |
| 81 | } else if (rank <= 6) { |
| 82 | return coords.slice(0, rank).map(coord => `sourceLoc.${coord}`).join(','); |
| 83 | } else { |
| 84 | throw Error(`Slicing for rank ${rank} is not yet supported`); |
| 85 | } |
| 86 | } |
no test coverage detected
searching dependent graphs…