@@ -1297,10 +1297,9 @@ namespace ts.Completions {
12971297 getTypeScriptMemberSymbols ( ) ;
12981298 }
12991299 else if ( isRightOfOpenTag ) {
1300- const tagSymbols = typeChecker . getJsxIntrinsicTagNamesAt ( location ) ;
1301- Debug . assertEachIsDefined ( tagSymbols , "getJsxIntrinsicTagNames() should all be defined" ) ;
1300+ symbols = typeChecker . getJsxIntrinsicTagNamesAt ( location ) ;
1301+ Debug . assertEachIsDefined ( symbols , "getJsxIntrinsicTagNames() should all be defined" ) ;
13021302 tryGetGlobalSymbols ( ) ;
1303- symbols = tagSymbols . concat ( symbols ) ;
13041303 completionKind = CompletionKind . Global ;
13051304 keywordFilters = KeywordCompletionFilters . None ;
13061305 }
@@ -1586,7 +1585,7 @@ namespace ts.Completions {
15861585 const attrsType = jsxContainer && typeChecker . getContextualType ( jsxContainer . attributes ) ;
15871586 if ( ! attrsType ) return GlobalsSearch . Continue ;
15881587 const completionsType = jsxContainer && typeChecker . getContextualType ( jsxContainer . attributes , ContextFlags . Completions ) ;
1589- symbols = filterJsxAttributes ( getPropertiesForObjectExpression ( attrsType , completionsType , jsxContainer ! . attributes , typeChecker ) , jsxContainer ! . attributes . properties ) ;
1588+ symbols = concatenate ( symbols , filterJsxAttributes ( getPropertiesForObjectExpression ( attrsType , completionsType , jsxContainer ! . attributes , typeChecker ) , jsxContainer ! . attributes . properties ) ) ;
15901589 setSortTextToOptionalMember ( ) ;
15911590 completionKind = CompletionKind . MemberLike ;
15921591 isNewIdentifierLocation = false ;
@@ -1644,7 +1643,7 @@ namespace ts.Completions {
16441643
16451644 const symbolMeanings = ( isTypeOnly ? SymbolFlags . None : SymbolFlags . Value ) | SymbolFlags . Type | SymbolFlags . Namespace | SymbolFlags . Alias ;
16461645
1647- symbols = typeChecker . getSymbolsInScope ( scopeNode , symbolMeanings ) ;
1646+ symbols = concatenate ( symbols , typeChecker . getSymbolsInScope ( scopeNode , symbolMeanings ) ) ;
16481647 Debug . assertEachIsDefined ( symbols , "getSymbolsInScope() should all be defined" ) ;
16491648 for ( const symbol of symbols ) {
16501649 if ( ! typeChecker . isArgumentsSymbol ( symbol ) &&
@@ -1981,7 +1980,7 @@ namespace ts.Completions {
19811980 const existingMemberEscapedNames : Set < __String > = new Set ( ) ;
19821981 existingMembers . forEach ( s => existingMemberEscapedNames . add ( s . escapedName ) ) ;
19831982
1984- symbols = filter ( members , s => ! existingMemberEscapedNames . has ( s . escapedName ) ) ;
1983+ symbols = concatenate ( symbols , filter ( members , s => ! existingMemberEscapedNames . has ( s . escapedName ) ) ) ;
19851984
19861985 completionKind = CompletionKind . ObjectPropertyDeclaration ;
19871986 isNewIdentifierLocation = true ;
@@ -2070,7 +2069,7 @@ namespace ts.Completions {
20702069
20712070 if ( typeMembers && typeMembers . length > 0 ) {
20722071 // Add filtered items to the completion list
2073- symbols = filterObjectMembersList ( typeMembers , Debug . checkDefined ( existingMembers ) ) ;
2072+ symbols = concatenate ( symbols , filterObjectMembersList ( typeMembers , Debug . checkDefined ( existingMembers ) ) ) ;
20742073 }
20752074 setSortTextToOptionalMember ( ) ;
20762075
@@ -2106,7 +2105,7 @@ namespace ts.Completions {
21062105 isNewIdentifierLocation = false ;
21072106 const exports = typeChecker . getExportsAndPropertiesOfModule ( moduleSpecifierSymbol ) ;
21082107 const existing = new Set ( ( namedImportsOrExports . elements as NodeArray < ImportOrExportSpecifier > ) . filter ( n => ! isCurrentlyEditingNode ( n ) ) . map ( n => ( n . propertyName || n . name ) . escapedText ) ) ;
2109- symbols = exports . filter ( e => e . escapedName !== InternalSymbolName . Default && ! existing . has ( e . escapedName ) ) ;
2108+ symbols = concatenate ( symbols , exports . filter ( e => e . escapedName !== InternalSymbolName . Default && ! existing . has ( e . escapedName ) ) ) ;
21102109 return GlobalsSearch . Success ;
21112110 }
21122111
@@ -2185,7 +2184,7 @@ namespace ts.Completions {
21852184 type ?. symbol && typeChecker . getPropertiesOfType ( typeChecker . getTypeOfSymbolAtLocation ( type . symbol , decl ) ) :
21862185 type && typeChecker . getPropertiesOfType ( type ) ;
21872186 } ) ;
2188- symbols = filterClassMembersList ( baseSymbols , decl . members , classElementModifierFlags ) ;
2187+ symbols = concatenate ( symbols , filterClassMembersList ( baseSymbols , decl . members , classElementModifierFlags ) ) ;
21892188 }
21902189
21912190 return GlobalsSearch . Success ;
0 commit comments