CONTINUES_CHAIN

tcmts.core.migrate.CONTINUES_CHAIN · #7vy6mk4r · term · runs anywhere

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).

export const CONTINUES_CHAIN = new Set([
  "PropertyAccessExpression",
  "ElementAccessExpression",
  "CallExpression",
  "TaggedTemplateExpression",
  "NonNullExpression",
  "NewExpression",
])

used by