Skip to content

Set#size has grammar typo in lib.es2015.collection.d.ts #63480

@Bertie690

Description

@Bertie690

⚙ Compilation target

ES2015+

⚙ Library

lib.es2015.collection.d.ts

Missing / Incorrect Definition

Set#size has a grammar typo.

interface Set<T> {
  /**
   * @returns the number of (unique) elements in Set.
   */
  readonly size: number;
}

Should be "in the Set" (or "this set", either works).

Note

I also noticed a large amount of inconsistent capitalization with regards to the @returns tags. Certain symbols (like size, has and the various ES2024 set intersection methods) all start their comments with lowercase, while others like delete capitalize the sentence like normal.
Personally, I'd prefer they be capitalized (as that seems to gel with existing uses and examples), but consistency is important regardless

Sample Code

N/A - docs issue

Documentation Link

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/size

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions