@@ -1297,10 +1297,9 @@ namespace ts.Completions {
1297
1297
getTypeScriptMemberSymbols ( ) ;
1298
1298
}
1299
1299
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" ) ;
1302
1302
tryGetGlobalSymbols ( ) ;
1303
- symbols = tagSymbols . concat ( symbols ) ;
1304
1303
completionKind = CompletionKind . Global ;
1305
1304
keywordFilters = KeywordCompletionFilters . None ;
1306
1305
}
@@ -1586,7 +1585,7 @@ namespace ts.Completions {
1586
1585
const attrsType = jsxContainer && typeChecker . getContextualType ( jsxContainer . attributes ) ;
1587
1586
if ( ! attrsType ) return GlobalsSearch . Continue ;
1588
1587
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 ) ) ;
1590
1589
setSortTextToOptionalMember ( ) ;
1591
1590
completionKind = CompletionKind . MemberLike ;
1592
1591
isNewIdentifierLocation = false ;
@@ -1644,7 +1643,7 @@ namespace ts.Completions {
1644
1643
1645
1644
const symbolMeanings = ( isTypeOnly ? SymbolFlags . None : SymbolFlags . Value ) | SymbolFlags . Type | SymbolFlags . Namespace | SymbolFlags . Alias ;
1646
1645
1647
- symbols = typeChecker . getSymbolsInScope ( scopeNode , symbolMeanings ) ;
1646
+ symbols = concatenate ( symbols , typeChecker . getSymbolsInScope ( scopeNode , symbolMeanings ) ) ;
1648
1647
Debug . assertEachIsDefined ( symbols , "getSymbolsInScope() should all be defined" ) ;
1649
1648
for ( const symbol of symbols ) {
1650
1649
if ( ! typeChecker . isArgumentsSymbol ( symbol ) &&
@@ -1981,7 +1980,7 @@ namespace ts.Completions {
1981
1980
const existingMemberEscapedNames : Set < __String > = new Set ( ) ;
1982
1981
existingMembers . forEach ( s => existingMemberEscapedNames . add ( s . escapedName ) ) ;
1983
1982
1984
- symbols = filter ( members , s => ! existingMemberEscapedNames . has ( s . escapedName ) ) ;
1983
+ symbols = concatenate ( symbols , filter ( members , s => ! existingMemberEscapedNames . has ( s . escapedName ) ) ) ;
1985
1984
1986
1985
completionKind = CompletionKind . ObjectPropertyDeclaration ;
1987
1986
isNewIdentifierLocation = true ;
@@ -2070,7 +2069,7 @@ namespace ts.Completions {
2070
2069
2071
2070
if ( typeMembers && typeMembers . length > 0 ) {
2072
2071
// Add filtered items to the completion list
2073
- symbols = filterObjectMembersList ( typeMembers , Debug . checkDefined ( existingMembers ) ) ;
2072
+ symbols = concatenate ( symbols , filterObjectMembersList ( typeMembers , Debug . checkDefined ( existingMembers ) ) ) ;
2074
2073
}
2075
2074
setSortTextToOptionalMember ( ) ;
2076
2075
@@ -2106,7 +2105,7 @@ namespace ts.Completions {
2106
2105
isNewIdentifierLocation = false ;
2107
2106
const exports = typeChecker . getExportsAndPropertiesOfModule ( moduleSpecifierSymbol ) ;
2108
2107
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 ) ) ) ;
2110
2109
return GlobalsSearch . Success ;
2111
2110
}
2112
2111
@@ -2185,7 +2184,7 @@ namespace ts.Completions {
2185
2184
type ?. symbol && typeChecker . getPropertiesOfType ( typeChecker . getTypeOfSymbolAtLocation ( type . symbol , decl ) ) :
2186
2185
type && typeChecker . getPropertiesOfType ( type ) ;
2187
2186
} ) ;
2188
- symbols = filterClassMembersList ( baseSymbols , decl . members , classElementModifierFlags ) ;
2187
+ symbols = concatenate ( symbols , filterClassMembersList ( baseSymbols , decl . members , classElementModifierFlags ) ) ;
2189
2188
}
2190
2189
2191
2190
return GlobalsSearch . Success ;
0 commit comments