function createExternsFromConstructor(className, constructorNode) {
  // Example code:
  //
  // /** @interface @exportInterface */
  // FooLike = function() {};
  //
  // /** @exportInterface @type {number} */
  // FooLike.prototype.bar;
  //
  // /** @export @implements {FooLike} */
  // class Foo {
  //   constructor() {
  //     /** @override @exportInterface */
  //     this.bar = 10;
  //   }
  // };
  //
  // Example externs:
  //
  // /**
  //  * Generated by createExternFromExportNode:
  //  * @implements {FooLike}
  //  */
  // class Foo {
  //   constructor() {}
  // }
  //
  // /**
  //  * Generated by createExternsFromConstructor:
  //  * @override
  //  */
  // Foo.prototype.bar;

  const expressionStatements = getAllExpressionStatements(constructorNode);
  let externString = '';

  for (const statement of expressionStatements) {
    const left = statement.expression.left;
    const right = statement.expression.right;

    // Skip anything that isn't an assignment to a member of "this".
    if (statement.expression.type != 'AssignmentExpression' ||
        left.type != 'MemberExpression' ||
        left.object.type != 'ThisExpression') {
      continue;
    }

    assert(left);
    assert(right);

    // Skip anything that isn't exported.
    let comment = getLeadingBlockComment(statement);
    if (!EXPORT_REGEX.test(comment)) {
      continue;
    }

    comment = removeExportAnnotationsFromComment(comment);

    assert.equal(left.property.type, 'Identifier');
    const name = className + '.prototype.' + left.property.name;
    externString += comment + '\n' + name + ';\n';
  }

  return externString;
}
Look for exports in a constructor body.  If we don't do this, we may end up
with errors about classes not fully implementing their interfaces.  In
reality, the interface is implemented by assigning members on "this".

@param {string} className
@param {ASTNode} constructorNode
@return {string}