mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
parse jsdoc param tag even without a param name
This commit is contained in:
@@ -5831,7 +5831,6 @@ namespace ts {
|
||||
|
||||
if (!name) {
|
||||
parseErrorAtPosition(pos, 0, Diagnostics.Identifier_expected);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let preName: Identifier, postName: Identifier;
|
||||
|
||||
@@ -2989,7 +2989,8 @@ namespace ts {
|
||||
switch (tag.kind) {
|
||||
case SyntaxKind.JSDocTypeTag:
|
||||
case SyntaxKind.JSDocParameterTag:
|
||||
let tagWithExpression = <JSDocTypeTag | JSDocParameterTag>tag;
|
||||
case SyntaxKind.JSDocReturnTag:
|
||||
let tagWithExpression = <JSDocTypeTag | JSDocParameterTag | JSDocReturnTag>tag;
|
||||
if (tagWithExpression.typeExpression) {
|
||||
insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
////
|
||||
////// @pa/*7*/
|
||||
////var v7;
|
||||
////
|
||||
/////** @param { n/*8*/ } */
|
||||
////var v8;
|
||||
////
|
||||
/////** @return { n/*9*/ } */
|
||||
////var v9;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("constructor");
|
||||
@@ -48,3 +54,9 @@ verify.completionListIsEmpty();
|
||||
goTo.marker('7');
|
||||
verify.completionListIsEmpty();
|
||||
|
||||
goTo.marker('8');
|
||||
verify.completionListContains('number');
|
||||
|
||||
goTo.marker('9');
|
||||
verify.completionListContains('number');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user