microsoft / microsoft/tsdoc

TSDocEmitter emits @defaultValue in a weird way

Open
#426 0 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

When parsing a comment like this:

/** @defaultValue value */

and printing the parsed docComment using TSDocEmitter it will create this output:

/**
 * @defaultvalue
 *
 * value
 */

While this seems to be still working with IDEs it is quite ugly.

I think this can be fixed by using the same handling as with @returns.

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 TSDocEmitter handling for @defaultValue and compare it with the existing @returns handling. Reproduce the comment shown in the issue, then adjust the emitter so the parsed output keeps the value on the tag line without the extra blank line.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.