@@ -167,17 +167,15 @@ namespace ts.Completions {
167
167
const uniqueNames = createMap < true > ( ) ;
168
168
if ( symbols ) {
169
169
for ( const symbol of symbols ) {
170
- if ( ! isEscapedNameOfWellKnownSymbol ( symbol . escapedName ) ) {
171
- const entry = createCompletionEntry ( symbol , location , performCharacterChecks , typeChecker , target , allowStringLiteral ) ;
172
- if ( entry ) {
173
- const id = entry . name ;
174
- if ( ! uniqueNames . has ( id ) ) {
175
- if ( symbolToOriginInfoMap && symbolToOriginInfoMap [ getUniqueSymbolId ( symbol , typeChecker ) ] ) {
176
- entry . hasAction = true ;
177
- }
178
- entries . push ( entry ) ;
179
- uniqueNames . set ( id , true ) ;
170
+ const entry = createCompletionEntry ( symbol , location , performCharacterChecks , typeChecker , target , allowStringLiteral ) ;
171
+ if ( entry ) {
172
+ const id = entry . name ;
173
+ if ( ! uniqueNames . has ( id ) ) {
174
+ if ( symbolToOriginInfoMap && symbolToOriginInfoMap [ getUniqueSymbolId ( symbol , typeChecker ) ] ) {
175
+ entry . hasAction = true ;
180
176
}
177
+ entries . push ( entry ) ;
178
+ uniqueNames . set ( id , true ) ;
181
179
}
182
180
}
183
181
}
@@ -1778,6 +1776,18 @@ namespace ts.Completions {
1778
1776
}
1779
1777
}
1780
1778
1779
+ // If the symbol is for a member of an object type and is the internal name of an ES
1780
+ // symbol, it is not a valid entry. Internal names for ES symbols start with "__@"
1781
+ if ( symbol . flags & SymbolFlags . ClassMember ) {
1782
+ const escapedName = symbol . escapedName as string ;
1783
+ if ( escapedName . length >= 3 &&
1784
+ escapedName . charCodeAt ( 0 ) === CharacterCodes . _ &&
1785
+ escapedName . charCodeAt ( 1 ) === CharacterCodes . _ &&
1786
+ escapedName . charCodeAt ( 2 ) === CharacterCodes . at ) {
1787
+ return undefined ;
1788
+ }
1789
+ }
1790
+
1781
1791
return getCompletionEntryDisplayName ( name , target , performCharacterChecks , allowStringLiteral ) ;
1782
1792
}
1783
1793
0 commit comments