Documentation does not explain what generics represent

Open Beginner friendly
#22,121 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
documentation

Research direction

Start with the MatDatepickerInputEvent entry in the Angular Material datepicker API documentation and inspect how its TypeScript declaration is presented. Document what the S and D type parameters represent, following the type-parameter style shown in the linked Java documentation. Done means newcomers can understand both generics from the API docs.

Written by the indexing model from the issue text.

Description

area: dev-infra docs P2
Documentation Feedback

In docs it would be helpful to have documentaion for declared TS generics.
For example, I open MatDatepickerInputEvent docs and see S and D generics.
And from the docs it's unclear what these S and D represent!

I think it should be documented similar to as Java does it.
For example, a docs of Java's standard type Function<T,​R> contain a section

Type Parameters:
T - the type of the input to the function
R - the type of the result of the function

Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 2h
Merged PRs (30d)
81

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.

More from angular/components

All issues in angular/components

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.