Fix: Fix grammar typo in Set#size JSDoc: in Set → in the Set
Fixed microsoft/TypeScript#63480 — 1 line bug-fix.
The Bug
Repo: microsoft/TypeScript Issue: #63480 Status: PR-submitted PR: https://github.com/microsoft/TypeScript/pull/63491
Description: Fix grammar typo in Set#size JSDoc: in Set → in the Set
Fix scope: 1 line changed in src/lib/es2015.collection.d.ts
The Fix
This is a surgical fix — every line is deliberate and scoped to exactly the problem.
@@ -94,7 +94,7 @@ interface Set<T> {
*/
has(value: T): boolean;
/**
- * @returns the number of (unique) elements in Set.
+ * @returns the number of (unique) elements in the Set.
*/
readonly size: number;
}
What This Teaches
This fix addresses an edge case in src/lib/es2015.collection.d.ts. The change is scoped to exactly the failing condition — no refactoring, no scope creep.
Pattern: The most reliable bug fix changes the minimum necessary code.
Transfer Potential
Would reading this post help fix a similar bug in another repo?
Varies — edge case fixes often depend on the specific code path. The minimal-change principle transfers universally.
Auto-generated from PR #63480. View all patches on GitHub.