microsoft / microsoft/TypeScript
Handle JSDoc @param with hyphen
Open
Nobody has claimed this yet.
Domain: JSDoc
Experience Enhancement
Suggestion
VS Code Tracked
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 2.7.0-dev.20171214
Code
/**
* @param x - Bla
*/
function foo(x) { }
Hover over x
Expected behavior:
Hyphen is ignored in any documentation returned. See JSDoc @param spec: http://usejsdoc.org/tags-param.html
Actual behavior:
Hyphen is returned as part of documentation:
[Trace - 2:58:07 PM] Response received: quickinfo (144). Request took 3 ms. Success: true
Result: {
"kind": "parameter",
"kindModifiers": "",
"start": {
"line": 4,
"offset": 14
},
"end": {
"line": 4,
"offset": 15
},
"displayString": "(parameter) x: any",
"documentation": "- Bla",
"tags": []
}
Contributor guide
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 from the TypeScript JSDoc @param handling used by the quickinfo hover response shown in the issue. Reproduce the sample, trace where the documentation string is formed, and verify that the returned documentation omits the separator hyphen while preserving the description.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100