fix(lib): add missing JSDoc to ReadonlySet and fix Set#size grammar#63488
Closed
Zelys-DFKH wants to merge 1 commit into
Closed
fix(lib): add missing JSDoc to ReadonlySet and fix Set#size grammar#63488Zelys-DFKH wants to merge 1 commit into
Zelys-DFKH wants to merge 1 commit into
Conversation
Closes microsoft#63480: Set#size JSDoc said "in Set" — added the missing article ("in the Set") to match the grammar used in Map#size and everywhere else in the file. Closes microsoft#63481: ReadonlySet.forEach, ReadonlySet.has, and ReadonlySet.size had no JSDoc at all. Added comments mirroring the corresponding Set<T> members (updating the callback type reference from Set<T> to ReadonlySet<T> where applicable). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Closing to revise before resubmission — draft opened prematurely. |
Contributor
|
There are already open PR to fix these issues. Why open another one? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #63480, closes #63481.
Two small documentation fixes in
src/lib/es2015.collection.d.ts, both tagged Help Wanted.Grammar fix (#63480):
Set#sizeJSDoc said "the number of (unique) elements in Set" — missing "the" before "Set". Changed to matchMap#sizeand the rest of the file.Missing JSDoc (#63481):
ReadonlySethad no documentation onforEach,has, orsize, whileSet<T>has full JSDoc on every member. Added the three missing blocks using the same text asSet<T>. The callback type reference changes fromSet<T>toReadonlySet<T>.ReadonlyMaphas the same gap, but that's a separate issue. Stayed minimal here.Checklist:
Backlogmilestonemainbranch— doc-only change (JSDoc comments only); no types or signatures changed, no baselines affectedhereby runtests