@@ -167,17 +167,15 @@ namespace ts.Completions {
167167 const uniqueNames = createMap < true > ( ) ;
168168 if ( symbols ) {
169169 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 ;
180176 }
177+ entries . push ( entry ) ;
178+ uniqueNames . set ( id , true ) ;
181179 }
182180 }
183181 }
@@ -1778,6 +1776,18 @@ namespace ts.Completions {
17781776 }
17791777 }
17801778
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+
17811791 return getCompletionEntryDisplayName ( name , target , performCharacterChecks , allowStringLiteral ) ;
17821792 }
17831793
0 commit comments