File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3024,13 +3024,16 @@ namespace ts {
30243024 typeForObject = typeChecker . getContextualType ( < ObjectLiteralExpression > objectLikeContainer ) ;
30253025 existingMembers = ( < ObjectLiteralExpression > objectLikeContainer ) . properties ;
30263026 }
3027- else {
3027+ else if ( objectLikeContainer . kind === SyntaxKind . ObjectBindingPattern ) {
30283028 // We are *only* completing on properties from the type being destructured.
30293029 isNewIdentifierLocation = false ;
30303030
30313031 typeForObject = typeChecker . getTypeAtLocation ( objectLikeContainer ) ;
30323032 existingMembers = ( < BindingPattern > objectLikeContainer ) . elements ;
30333033 }
3034+ else {
3035+ Debug . fail ( "Expected object literal or binding pattern, got " + objectLikeContainer . kind ) ;
3036+ }
30343037
30353038 if ( ! typeForObject ) {
30363039 return false ;
You can’t perform that action at this time.
0 commit comments