@@ -3105,6 +3105,7 @@ namespace ts {
31053105 let node = currentToken ;
31063106 let isRightOfDot = false ;
31073107 let isRightOfOpenTag = false ;
3108+ let isStartingCloseTag = false ;
31083109
31093110 let location = getTouchingPropertyName ( sourceFile , position ) ;
31103111 if ( contextToken ) {
@@ -3130,9 +3131,14 @@ namespace ts {
31303131 return undefined ;
31313132 }
31323133 }
3133- else if ( kind === SyntaxKind . LessThanToken && sourceFile . languageVariant === LanguageVariant . JSX ) {
3134- isRightOfOpenTag = true ;
3135- location = contextToken ;
3134+ else if ( sourceFile . languageVariant === LanguageVariant . JSX ) {
3135+ if ( kind === SyntaxKind . LessThanToken ) {
3136+ isRightOfOpenTag = true ;
3137+ location = contextToken ;
3138+ }
3139+ else if ( kind === SyntaxKind . SlashToken && contextToken . parent . kind === SyntaxKind . JsxClosingElement ) {
3140+ isStartingCloseTag = true ;
3141+ }
31363142 }
31373143 }
31383144
@@ -3155,6 +3161,13 @@ namespace ts {
31553161 isMemberCompletion = true ;
31563162 isNewIdentifierLocation = false ;
31573163 }
3164+ else if ( isStartingCloseTag ) {
3165+ let tagName = ( < JsxElement > contextToken . parent . parent ) . openingElement . tagName ;
3166+ symbols = [ typeChecker . getSymbolAtLocation ( tagName ) ] ;
3167+
3168+ isMemberCompletion = true ;
3169+ isNewIdentifierLocation = false ;
3170+ }
31583171 else {
31593172 // For JavaScript or TypeScript, if we're not after a dot, then just try to get the
31603173 // global symbols in scope. These results should be valid for either language as
0 commit comments