RFC: Normalized form for standard TSDoc tags
Open
Nobody has claimed this yet.
request for comments
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 162
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 8
Description
Consider this example:
/**
* Adds two numbers together.
*
* @remarks
* This method is part of the {@link core-libary/Math | Math subsystem}.
*
* @param x - The first number to add
* @param y - The second number to add
* @returns The sum of `x` and `y`
*
* @beta
*/
function add(x: number, y: number): number;
Is the ordering of tags important? Would this be legal:
/**
* @beta
* @returns The sum of `x` and `y`
* @param y - The second number to add
* @param x - The first number to add
* Adds two numbers together.
*
* @remarks
* This method is part of the {@link core-libary/Math | Math subsystem}.
*/
function add(x: number, y: number): number;
What about this?
/**
* @beta @returns The sum of `x` and `y`
* @param y - The second number to add @param x - The first number to add
* Adds two numbers together. @remarks This method is part of
* the {@link core-libary/Math | Math subsystem}.
*/
function add(x: number, y: number): number;
Some questions:
- If it's not legal, what's the best way to specify which orders are allowable?
- What should the parser do with ambiguous orderings?
- Should the TSDoc library include an operation for normalizing an AST?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the three TSDoc examples and the questions about tag ordering, ambiguous parsing, and AST normalization. Review the parser and AST behavior relevant to these examples, then define the allowable ordering and the expected handling of ambiguous input. Done means the RFC has a settled specification and a clear decision on whether normalization belongs in the library.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100