microsoft / microsoft/TypeScript

Improving documentation for built-in type declarations

Open
#40,024 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Looking at for instance lib.dom.d.ts, what I notice is that the documentation isn't what it could be. Is there any policy w.r.t. improving on this? I think the benefits of better docs are quite obvious, for instance adding examples or stating browser support for certain features.

However I wonder if:

  • Since the file is already quite large, and adding documentation could blow it up like 100x, would this cause any performance issues (in editors)? If so, is there a way around it?
  • The best documentation on these things (that I know of) are on MDN. A nice start could be to link/auto add some docs from there, if the licensing allows it (https://wiki.developer.mozilla.org/en-US/docs/MDN/About#Copyrights_and_licenses). I think it does at least in part.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing lib.dom.d.ts and the issue's questions about documentation size, editor performance, and MDN licensing. Compare the existing declarations with the referenced MDN material. This issue is complete only after the project agrees on a documentation policy and a concrete, accepted approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.