tcmts.core.migrate

CONTINUES_CHAIN Set<string>
The parents in which a parenthesized optional chain's parentheses matter: the chain goes on after them, and without them would go on optionally too (`(a?.b).c` throws when `a` is undefined; `a?.b.c` doesn't).
IR_STEPS Record<number, (ir: IR) => IR>
How the IR of each format becomes the next one's: `IR_STEPS[n]` takes format `n` to `n + 1`.
dropUncontinuedParens (ir: IR) => IR
Format 1 to 2: parentheses around an optional chain are kept only where the chain goes on after them. Format 1 kept all of them, so a formatter adding redundant ones (`(a?.b())`) changed a hash. Format 1 dropped every other parenthesis already, so each one left in its IR is around an optional chain.
testParensOnlyWhereTheChainGoesOn () => void
upgradeIR (ir: IR, from: number, to: number) => IR
IR of format `from`, as format `to` writes it: each step in turn. Throws if a step is missing.