microsoft / microsoft/TypeScript

`Array.prototype.at` docs use "code unit" instead of "item"

Open Beginner friendly
#63,722 4 comments 1 reaction 0 assignees View on GitHub
Domain: lib.d.ts Help Wanted
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

### Acknowledgement

- [x] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

### Comment

The `@param` tag [here](https://github.com/microsoft/TypeScript/blob/b465fdbfe175304d9b977da137b2c178ae1091d3/src/lib/es2022.array.d.ts#L4) in the docs for `Array.prototype.at` uses the term "code unit" instead of the more appropriate term "item" or "element". It was presumably copied from the docs for `String.prototype.at` [here](https://github.com/microsoft/TypeScript/blob/main/src/lib/es2022.string.d.ts#L4). I'd make a PR but there was an explicit recommendation not to do that for typos.

Contributor guide

Open the contributing guide

Research direction

Start in src/lib/es2022.array.d.ts at the @param documentation for Array.prototype.at, then compare it with src/lib/es2022.string.d.ts. Update the array documentation to use the appropriate term for an array value, and verify the declaration-file documentation remains consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
91/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.