(read: Reference)
| 1779 | return text + code.slice(start, end) |
| 1780 | } |
| 1781 | const writtenAt = (read: Reference) => { |
| 1782 | const { init } = moving.get(read)! |
| 1783 | const text = textOf(init!.start, init!.end) |
| 1784 | const parent = read.id.parent |
| 1785 | return ( |
| 1786 | parent?.type === "Property" && parent.shorthand ? |
| 1787 | `${read.id.name}: ${text}` |
| 1788 | : ( |
| 1789 | (parent?.type === "CallExpression" || |
| 1790 | parent?.type === "NewExpression") && |
| 1791 | parent.callee === read.id |
| 1792 | ) ? |
| 1793 | `(${text})` |
| 1794 | : text |
| 1795 | ) |
| 1796 | } |
| 1797 | const moved = new Set(moving.values()) |
| 1798 | const isMoved = spansContaining([...moved].map(d => d.init!)) |
| 1799 | for (const read of reads) { |
no test coverage detected