Skip to content

Commit

Permalink
apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffy-g committed Apr 29, 2020
1 parent f4e4f21 commit cc5f790
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/services/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,10 @@ namespace ts.Completions {
if (match && reJSDocFragment.lastIndex === jsdocFragment.length) {
return {
kind: match[1]
// The current position is next to the '@' sign, when no tag name being provided yet.
// Provide a full list of tag names
? CompletionDataKind.JsDocTagName:
CompletionDataKind.JsDocTag
// The current position is next to the '@' sign, when no tag name being provided yet.
// Provide a full list of tag names
? CompletionDataKind.JsDocTagName
: CompletionDataKind.JsDocTag
};
}
}
Expand All @@ -888,6 +888,9 @@ namespace ts.Completions {
// Completion should work in the brackets
const tag = getJsDocTagAtPosition(currentToken, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
return { kind: CompletionDataKind.JsDocTagName };
}
if (isTagWithTypeExpression(tag) && tag.typeExpression && tag.typeExpression.kind === SyntaxKind.JSDocTypeExpression) {
currentToken = getTokenAtPosition(sourceFile, position);
if (!currentToken ||
Expand Down

0 comments on commit cc5f790

Please sign in to comment.