Microsoft/TypeScript

`ReadonlySet` lacks documentation for `has`, `forEach` and `size`

Open

#63481 opened on May 15, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (48,455 stars) (6,726 forks)batch import
Domain: lib.d.tsHelp WantedPossible Improvement

Description

⚙ Compilation target

ES2015+

⚙ Library

lib.es2015.collection.d.ts

Missing / Incorrect Definition

ReadonlySet<T> lacks documentation for forEach, has and size.

These should ideally be copied from regular Set<T> for consistency.

Sample Code

https://www.typescriptlang.org/play/?#code/MYewdgzgLgBA5gLhgZQKZQDzQE4EsxwB8MAvDGKgO4roAUA2gEQBMjAugJQDcAUKJLABmSAEqoAhgBNwAGwCeaTDnxFS8XjwD0mmAAkQAN1TYYh4zHFhJMCKlQwoAC3uTcgwcdRhg9gLTwYR3EIGGlgEMpHXBl7QRgZcWAAaxCnVABbHkEAOkEQbABRRMceOFz8ouASnKCIUuzarOyIXAAvVHqW9p4gA

Documentation Link

N/A

Contributor guide