File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1597,7 +1597,7 @@ namespace ts.refactor.extractSymbol {
1597
1597
const functionErrorsPerScope : Diagnostic [ ] [ ] = [ ] ;
1598
1598
const constantErrorsPerScope : Diagnostic [ ] [ ] = [ ] ;
1599
1599
const visibleDeclarationsInExtractedRange : NamedDeclaration [ ] = [ ] ;
1600
- const exposedVariableSymbolSet = new Map < string , true > ( ) ; // Key is symbol ID
1600
+ const exposedVariableSymbolSet = new Set < Symbol > ( ) ; // Key is symbol ID
1601
1601
const exposedVariableDeclarations : VariableDeclaration [ ] = [ ] ;
1602
1602
let firstExposedNonVariableDeclaration : NamedDeclaration | undefined ;
1603
1603
@@ -1903,10 +1903,10 @@ namespace ts.refactor.extractSymbol {
1903
1903
const decl = find ( visibleDeclarationsInExtractedRange , d => d . symbol === sym ) ;
1904
1904
if ( decl ) {
1905
1905
if ( isVariableDeclaration ( decl ) ) {
1906
- const idString = decl . symbol . id ! . toString ( ) ;
1907
- if ( ! exposedVariableSymbolSet . has ( idString ) ) {
1906
+ const declSymbol = decl . symbol ;
1907
+ if ( ! exposedVariableSymbolSet . has ( declSymbol ) ) {
1908
1908
exposedVariableDeclarations . push ( decl ) ;
1909
- exposedVariableSymbolSet . set ( idString , true ) ;
1909
+ exposedVariableSymbolSet . add ( declSymbol ) ;
1910
1910
}
1911
1911
}
1912
1912
else {
You can’t perform that action at this time.
0 commit comments