function createExternFromPartiallyExportedClassAssignmentNode(names, node) {
  assert.equal(node.type, 'ExpressionStatement', 'Unknown node type');
  assert.equal(node.expression.type, 'AssignmentExpression',
      'Should be assignment node');
  assert.equal(node.expression.right.type, 'ClassExpression',
      'Should be class assignment');

  const name = getIdentifierString(node.expression.left);
  const assignment = createExternAssignment(name, node.expression.right,
      /* alwaysIncludeConstructor= */ false);

  let externString = name + assignment + ';\n';

  // Find this.foo = bar in the constructor, and potentially generate externs
  // for that, too.
  const rightSide = node.expression.right;
  const ctor = getClassConstructor(node.expression.right);
  if (ctor) {
    externString += createExternsFromConstructor(name, ctor);
  }

  // Keep track of the names we've externed.
  names.add(name);

  return externString;
}
Some classes are not exported, but contain exported members.  These need to
have externs generated, too.

@param {!Set<string>} names A set of the names of exported nodes.
@param {ASTNode} node An exported node from the abstract syntax tree.
@return {string} An extern string for this node.