src/language-js/parse-postprocess.js/transformChainExpression
function transformChainExpression(node) {
  if (node.type === "CallExpression") {
    node.type = "OptionalCallExpression";
    node.callee = transformChainExpression(node.callee);
  } else if (node.type === "MemberExpression") {
    node.type = "OptionalMemberExpression";
    node.object = transformChainExpression(node.object);
  }
  // typescript
  else if (node.type === "TSNonNullExpression") {
    node.expression = transformChainExpression(node.expression);
  }
  return node;
}