microsoft / microsoft/tsdoc

How to denote that a @typeparam should extends another type?

Open
#275 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5k
Forks
162
Avg merge
17h 24m
Merged PRs (30d)
8

Description

I want to tell others that a type param should follow some rules for example:

/**
 * @typeparam T - some desc
 */

interface A<T extends string> {
    name: T;
}

How can I add description like "should extend from string" for @typeparam T?

The playground https://microsoft.github.io/tsdoc seems not supports display @typeparam information in the output.

Contributor guide

No contributing guide indexed for this repository

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 with the TSDoc playground linked in the issue and inspect how the @typeparam example is parsed and rendered. Determine whether the syntax for describing the extends constraint is specified or whether the playground is missing support; done means the expected notation or limitation is clearly documented and the playground behavior is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.