File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3367,19 +3367,14 @@ function getCompletionData(
33673367 const typeExpression = tryGetTypeExpressionFromTag ( tag ) ;
33683368 if ( typeExpression ) {
33693369 currentToken = getTokenAtPosition ( sourceFile , position ) ;
3370- // Enable type completions if in type expression, unless token is a declaration
3371- // name inside it (e.g., property name in `{ prop: Type }`). See #62281.
3372- if ( isCurrentlyEditingNode ( typeExpression ) ) {
3373- const tokenIsInsideTypeExpression = currentToken && isCurrentlyEditingNode ( currentToken ) ;
3374- if (
3375- ! currentToken ||
3376- ! tokenIsInsideTypeExpression ||
3377- ( ! isDeclarationName ( currentToken ) &&
3378- ( currentToken . parent . kind !== SyntaxKind . JSDocPropertyTag ||
3379- ( currentToken . parent as JSDocPropertyTag ) . name !== currentToken ) )
3380- ) {
3381- insideJsDocTagTypeExpression = true ;
3382- }
3370+ if (
3371+ ! currentToken ||
3372+ ( ! isDeclarationName ( currentToken ) &&
3373+ ( currentToken . parent . kind !== SyntaxKind . JSDocPropertyTag ||
3374+ ( currentToken . parent as JSDocPropertyTag ) . name !== currentToken ) )
3375+ ) {
3376+ // Use as type location if inside tag's type expression
3377+ insideJsDocTagTypeExpression = isCurrentlyEditingNode ( typeExpression ) ;
33833378 }
33843379 }
33853380 if ( ! insideJsDocTagTypeExpression && isJSDocParameterTag ( tag ) && ( nodeIsMissing ( tag . name ) || tag . name . pos <= position && position <= tag . name . end ) ) {
You can’t perform that action at this time.
0 commit comments