@@ -3280,7 +3280,7 @@ function getContextualType(previousToken: Node, position: number, sourceFile: So
32803280 isEqualityOperatorKind ( previousToken . kind ) && isBinaryExpression ( parent ) && isEqualityOperatorKind ( parent . operatorToken . kind ) ?
32813281 // completion at `x ===/**/` should be for the right side
32823282 checker . getTypeAtLocation ( parent . left ) :
3283- checker . getContextualType ( previousToken as Expression , ContextFlags . Completions ) || checker . getContextualType ( previousToken as Expression ) ;
3283+ checker . getContextualType ( previousToken as Expression , ContextFlags . IgnoreNodeInferences ) || checker . getContextualType ( previousToken as Expression ) ;
32843284 }
32853285}
32863286
@@ -3966,7 +3966,7 @@ function getCompletionData(
39663966 // Cursor is inside a JSX self-closing element or opening element
39673967 const attrsType = jsxContainer && typeChecker . getContextualType ( jsxContainer . attributes ) ;
39683968 if ( ! attrsType ) return GlobalsSearch . Continue ;
3969- const completionsType = jsxContainer && typeChecker . getContextualType ( jsxContainer . attributes , ContextFlags . Completions ) ;
3969+ const completionsType = jsxContainer && typeChecker . getContextualType ( jsxContainer . attributes , ContextFlags . IgnoreNodeInferences ) ;
39703970 symbols = concatenate ( symbols , filterJsxAttributes ( getPropertiesForObjectExpression ( attrsType , completionsType , jsxContainer . attributes , typeChecker ) , jsxContainer . attributes . properties ) ) ;
39713971 setSortTextToOptionalMember ( ) ;
39723972 completionKind = CompletionKind . MemberLike ;
@@ -4564,7 +4564,7 @@ function getCompletionData(
45644564 }
45654565 return GlobalsSearch . Continue ;
45664566 }
4567- const completionsType = typeChecker . getContextualType ( objectLikeContainer , ContextFlags . Completions ) ;
4567+ const completionsType = typeChecker . getContextualType ( objectLikeContainer , ContextFlags . IgnoreNodeInferences ) ;
45684568 const hasStringIndexType = ( completionsType || instantiatedType ) . getStringIndexType ( ) ;
45694569 const hasNumberIndextype = ( completionsType || instantiatedType ) . getNumberIndexType ( ) ;
45704570 isNewIdentifierLocation = ! ! hasStringIndexType || ! ! hasNumberIndextype ;
0 commit comments