Skip to content

Conversation

@ahejlsberg
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CHANGES.md documentation to reflect the implementation of issue #2513, which relates to handling CommonJS exports initialized to undefined. The changes primarily reorganize and update documentation about implemented features and behavior changes.

Changes:

  • Removed "Features yet to be implemented" section for Object.defineProperty on CommonJS exports (now implemented)
  • Updated @typedef/@callback behavior description to reflect hoisting semantics
  • Replaced removed CommonJS limitations with documentation about the new undefined initialization pattern support

CHANGES.md Outdated
#### Initializing exports to `undefined`:

If you can't configure your package to use ESM syntax, you can use destructuring instead:
To accomodate the pattern of initializing CommonJS exports to `undefined` (sometimes written as `void 0`) and then subseqently assigning their intended values, when CommonJS exports have multiple assignments and an initial assignment of `undefined`, the `undefined` is ignored when determining the type of the export.
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "subseqently" should be spelled "subsequently".

Suggested change
To accomodate the pattern of initializing CommonJS exports to `undefined` (sometimes written as `void 0`) and then subseqently assigning their intended values, when CommonJS exports have multiple assignments and an initial assignment of `undefined`, the `undefined` is ignored when determining the type of the export.
To accomodate the pattern of initializing CommonJS exports to `undefined` (sometimes written as `void 0`) and then subsequently assigning their intended values, when CommonJS exports have multiple assignments and an initial assignment of `undefined`, the `undefined` is ignored when determining the type of the export.

Copilot uses AI. Check for mistakes.
ahejlsberg and others added 2 commits January 18, 2026 08:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants