Skip to content

Update exports style in goog.module-migrated files #5133

@cpcallen

Description

@cpcallen

Background

Earlier versions of the goog.module Module Conversion Guide in #5026 specified the following export style, with a single assignment to exports:

  /** @public */
  const publicThing = /* ... */;
  /** @private */
  const supposedlyPrivateThing = /* ... */;
  /** @private */
  const actuallyPrivateThing = /* ... */;

  exports = {
    publicThing,
    supposedlyPrivateThing_: supposedlyPrivateThing,
  };

After some further consideration, we decided it would be preferable to organise exports as a series of assignments to individual properties on exports instead (final style TBC):

const publicThing = /* ... */;
exports.publicThing = publicThing;

const supposedlyPrivateThing = /* ... */;
exports.supposedlyPrivateThing_ = supposedlyPrivateThing;

const actuallyPrivateThing = /* ... */;

Issue

We should be consistent about this.

Suggested Fix

Create a single PR bulk-updating already-migrated files from the earlier style to the current one.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions