-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
From DefinitelyTyped/DefinitelyTyped#53629
Bug Report
🔎 Search Terms
- jsdoc
@link
🕗 Version & Regression Information
TS 4.3.2
💻 Code
For the code
function foo(){}
/**
* {@link foo()}
*/
const bar = 2
- Hover over
bar
🙁 Actual behavior
The returned hover includes:
"documentation": [
{
"text": "",
"kind": "text"
},
{
"text": "{@link ",
"kind": "link"
},
{
"text": "foo",
"kind": "linkName",
"target": {
"file": "/Users/matb/projects/san/x.tsx",
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 17
}
}
},
{
"text": "()",
"kind": "linkText"
},
{
"text": "}",
"kind": "link"
}
],
Notice how the linkText
is ()
🙂 Expected behavior
I'd expect this example to have no linkText
as the ()
is part of the symbol name
Having trailing parens in a link in somewhat common in definitely typed (it occurs around 1000 times in my quick search) so we should likely support this case
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone