Skip to content

Update JS documentation in CHANGES.md:#3718

Merged
sandersn merged 1 commit intomainfrom
update-js-in-CHANGES
May 6, 2026
Merged

Update JS documentation in CHANGES.md:#3718
sandersn merged 1 commit intomainfrom
update-js-in-CHANGES

Conversation

@sandersn
Copy link
Copy Markdown
Member

@sandersn sandersn commented May 5, 2026

  1. constructor functions are not supported
  2. a few other features are now supported

I called out constructor function removal at the beginning since we've got a few questions about it recently.

1. constructor functions are not supported
2. a few other features are now supported
Copilot AI review requested due to automatic review settings May 5, 2026 22:18
@sandersn sandersn requested a review from ahejlsberg May 5, 2026 22:19
Copy link
Copy Markdown
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

Updates the JavaScript support documentation in CHANGES.md to clarify removed/unsupported JS patterns (notably constructor functions) and adjust the removed/unsupported feature lists to match current behavior.

Changes:

  • Removes the earlier introductory mention that implied constructor functions still work, and replaces it with a clearer framing about trimming underused features.
  • Adds explicit documentation and examples showing constructor functions are not supported and recommends converting to class.
  • Updates the removed/unsupported JSDoc type/tag lists and the “Expando declarations” table to reflect the revised support matrix.
Show a summary per file
File Description
CHANGES.md Updates JS support documentation, especially around expando-based constructor functions and related JSDoc/expando notes.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread CHANGES.md
Comment on lines 69 to 72
| `@author` | <pre><code>/** @author Finn <finn@treehouse.com> */</pre></code> | Keep the same. | `@treehouse` parses as a new tag in Corsa. |
| Postfix optional type | `T?` | `T \| undefined` | This was legacy in Closure. |
| Postfix definite type | `T!` | `T` | This was legacy in Closure. |
| Identifier-named typedefs |<pre><code>`/** @typedef {T} */ typeName;</pre></code> | <pre><code>/** @typedef {T} typeName */</pre></code> | Closure feature. |
| Closure function type syntax | <pre><code>/* @type {function(string): void} */</pre></code> | <pre><code>/* @type {(s: string) => void} */</pre></code> | |
| Automatic typeof insertion | <pre><code>const o = { a: 1 };</code><br/><code>/\** @type {o} */</code><br/><code>var o2 = { a: 1 };</code></pre> | <pre><code>const o = { a: 1 };</code><br/><code>/\** @type {typeof o} */</code><br/><code>var o2 = { a: 1 };</code></pre> | |
Comment thread CHANGES.md
#### `@class` or `@constructor` does not make a function into a constructor function.

Corsa ignores `@class` and `@constructor`. This makes a difference on a function without this-property assignments or associated prototype-function assignments.
Constructor functions are no longer supported. See the Expandos section.
@sandersn sandersn added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 20d34b5 May 6, 2026
25 checks passed
@sandersn sandersn deleted the update-js-in-CHANGES branch May 6, 2026 13:11
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