@@ -1275,10 +1275,9 @@ namespace ts.Completions {
12751275 getTypeScriptMemberSymbols ( ) ;
12761276 }
12771277 else if ( isRightOfOpenTag ) {
1278- const tagSymbols = typeChecker . getJsxIntrinsicTagNamesAt ( location ) ;
1279- Debug . assertEachIsDefined ( tagSymbols , "getJsxIntrinsicTagNames() should all be defined" ) ;
1278+ symbols = typeChecker . getJsxIntrinsicTagNamesAt ( location ) ;
1279+ Debug . assertEachIsDefined ( symbols , "getJsxIntrinsicTagNames() should all be defined" ) ;
12801280 tryGetGlobalSymbols ( ) ;
1281- symbols = tagSymbols . concat ( symbols ) ;
12821281 completionKind = CompletionKind . Global ;
12831282 keywordFilters = KeywordCompletionFilters . None ;
12841283 }
@@ -1564,7 +1563,7 @@ namespace ts.Completions {
15641563 const attrsType = jsxContainer && typeChecker . getContextualType ( jsxContainer . attributes ) ;
15651564 if ( ! attrsType ) return GlobalsSearch . Continue ;
15661565 const completionsType = jsxContainer && typeChecker . getContextualType ( jsxContainer . attributes , ContextFlags . Completions ) ;
1567- symbols = filterJsxAttributes ( getPropertiesForObjectExpression ( attrsType , completionsType , jsxContainer ! . attributes , typeChecker ) , jsxContainer ! . attributes . properties ) ;
1566+ symbols = concatenate ( symbols , filterJsxAttributes ( getPropertiesForObjectExpression ( attrsType , completionsType , jsxContainer ! . attributes , typeChecker ) , jsxContainer ! . attributes . properties ) ) ;
15681567 setSortTextToOptionalMember ( ) ;
15691568 completionKind = CompletionKind . MemberLike ;
15701569 isNewIdentifierLocation = false ;
@@ -1621,7 +1620,7 @@ namespace ts.Completions {
16211620
16221621 const symbolMeanings = ( isTypeOnly ? SymbolFlags . None : SymbolFlags . Value ) | SymbolFlags . Type | SymbolFlags . Namespace | SymbolFlags . Alias ;
16231622
1624- symbols = typeChecker . getSymbolsInScope ( scopeNode , symbolMeanings ) ;
1623+ symbols = concatenate ( symbols , typeChecker . getSymbolsInScope ( scopeNode , symbolMeanings ) ) ;
16251624 Debug . assertEachIsDefined ( symbols , "getSymbolsInScope() should all be defined" ) ;
16261625 for ( const symbol of symbols ) {
16271626 if ( ! typeChecker . isArgumentsSymbol ( symbol ) &&
@@ -1957,7 +1956,7 @@ namespace ts.Completions {
19571956 const existingMemberEscapedNames : Set < __String > = new Set ( ) ;
19581957 existingMembers . forEach ( s => existingMemberEscapedNames . add ( s . escapedName ) ) ;
19591958
1960- symbols = filter ( members , s => ! existingMemberEscapedNames . has ( s . escapedName ) ) ;
1959+ symbols = concatenate ( symbols , filter ( members , s => ! existingMemberEscapedNames . has ( s . escapedName ) ) ) ;
19611960
19621961 completionKind = CompletionKind . ObjectPropertyDeclaration ;
19631962 isNewIdentifierLocation = true ;
@@ -2046,7 +2045,7 @@ namespace ts.Completions {
20462045
20472046 if ( typeMembers && typeMembers . length > 0 ) {
20482047 // Add filtered items to the completion list
2049- symbols = filterObjectMembersList ( typeMembers , Debug . checkDefined ( existingMembers ) ) ;
2048+ symbols = concatenate ( symbols , filterObjectMembersList ( typeMembers , Debug . checkDefined ( existingMembers ) ) ) ;
20502049 }
20512050 setSortTextToOptionalMember ( ) ;
20522051
@@ -2082,7 +2081,7 @@ namespace ts.Completions {
20822081 isNewIdentifierLocation = false ;
20832082 const exports = typeChecker . getExportsAndPropertiesOfModule ( moduleSpecifierSymbol ) ;
20842083 const existing = new Set ( ( namedImportsOrExports . elements as NodeArray < ImportOrExportSpecifier > ) . filter ( n => ! isCurrentlyEditingNode ( n ) ) . map ( n => ( n . propertyName || n . name ) . escapedText ) ) ;
2085- symbols = exports . filter ( e => e . escapedName !== InternalSymbolName . Default && ! existing . has ( e . escapedName ) ) ;
2084+ symbols = concatenate ( symbols , exports . filter ( e => e . escapedName !== InternalSymbolName . Default && ! existing . has ( e . escapedName ) ) ) ;
20862085 return GlobalsSearch . Success ;
20872086 }
20882087
@@ -2161,7 +2160,7 @@ namespace ts.Completions {
21612160 type ?. symbol && typeChecker . getPropertiesOfType ( typeChecker . getTypeOfSymbolAtLocation ( type . symbol , decl ) ) :
21622161 type && typeChecker . getPropertiesOfType ( type ) ;
21632162 } ) ;
2164- symbols = filterClassMembersList ( baseSymbols , decl . members , classElementModifierFlags ) ;
2163+ symbols = concatenate ( symbols , filterClassMembersList ( baseSymbols , decl . members , classElementModifierFlags ) ) ;
21652164 }
21662165
21672166 return GlobalsSearch . Success ;
0 commit comments