Skip to content

Improve jsdoc for Array.prototype.sort #33046

Closed
@m1gu3l

Description

@m1gu3l

Search Terms

sort compareFn

Suggestion

Jsdoc for Array.prototype.sort compareFn could be improved.

Use Cases

Some people (myself included) tend to forget expected output of compareFn.

Examples

With better jsdoc they wouldn't have to open MDN.

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions