@@ -349,17 +349,17 @@ namespace ts {
349
349
// Otherwise, we'll be merging into a compatible existing symbol (for example when
350
350
// you have multiple 'vars' with the same name in the same container). In this case
351
351
// just add this node into the declarations list of the symbol.
352
- symbol = symbolTable [ name ] || ( symbolTable [ name ] = createSymbol ( SymbolFlags . None , name ) ) ;
352
+ symbol = symbolTable . get ( name ) || set ( symbolTable , name , createSymbol ( SymbolFlags . None , name ) ) ;
353
353
354
354
if ( name && ( includes & SymbolFlags . Classifiable ) ) {
355
- classifiableNames [ name ] = name ;
355
+ classifiableNames . set ( name , name ) ;
356
356
}
357
357
358
358
if ( symbol . flags & excludes ) {
359
359
if ( symbol . isReplaceableByMethod ) {
360
360
// Javascript constructor-declared symbols can be discarded in favor of
361
361
// prototype symbols like methods.
362
- symbol = symbolTable [ name ] = createSymbol ( SymbolFlags . None , name ) ;
362
+ symbol = set ( symbolTable , name , createSymbol ( SymbolFlags . None , name ) ) ;
363
363
}
364
364
else {
365
365
if ( node . name ) {
@@ -1570,7 +1570,7 @@ namespace ts {
1570
1570
const typeLiteralSymbol = createSymbol ( SymbolFlags . TypeLiteral , "__type" ) ;
1571
1571
addDeclarationToSymbol ( typeLiteralSymbol , node , SymbolFlags . TypeLiteral ) ;
1572
1572
typeLiteralSymbol . members = createMap < Symbol > ( ) ;
1573
- typeLiteralSymbol . members [ symbol . name ] = symbol ;
1573
+ typeLiteralSymbol . members . set ( symbol . name , symbol ) ;
1574
1574
}
1575
1575
1576
1576
function bindObjectLiteralExpression ( node : ObjectLiteralExpression ) {
@@ -1601,9 +1601,9 @@ namespace ts {
1601
1601
? ElementKind . Property
1602
1602
: ElementKind . Accessor ;
1603
1603
1604
- const existingKind = seen [ identifier . text ] ;
1604
+ const existingKind = seen . get ( identifier . text ) ;
1605
1605
if ( ! existingKind ) {
1606
- seen [ identifier . text ] = currentKind ;
1606
+ seen . set ( identifier . text , currentKind ) ;
1607
1607
continue ;
1608
1608
}
1609
1609
@@ -2208,7 +2208,7 @@ namespace ts {
2208
2208
constructorFunction . parent = classPrototype ;
2209
2209
classPrototype . parent = leftSideOfAssignment ;
2210
2210
2211
- const funcSymbol = container . locals [ constructorFunction . text ] ;
2211
+ const funcSymbol = container . locals . get ( constructorFunction . text ) ;
2212
2212
if ( ! funcSymbol || ! ( funcSymbol . flags & SymbolFlags . Function || isDeclarationOfFunctionExpression ( funcSymbol ) ) ) {
2213
2213
return ;
2214
2214
}
@@ -2239,7 +2239,7 @@ namespace ts {
2239
2239
bindAnonymousDeclaration ( node , SymbolFlags . Class , bindingName ) ;
2240
2240
// Add name of class expression into the map for semantic classifier
2241
2241
if ( node . name ) {
2242
- classifiableNames [ node . name . text ] = node . name . text ;
2242
+ classifiableNames . set ( node . name . text , node . name . text ) ;
2243
2243
}
2244
2244
}
2245
2245
@@ -2255,14 +2255,14 @@ namespace ts {
2255
2255
// module might have an exported variable called 'prototype'. We can't allow that as
2256
2256
// that would clash with the built-in 'prototype' for the class.
2257
2257
const prototypeSymbol = createSymbol ( SymbolFlags . Property | SymbolFlags . Prototype , "prototype" ) ;
2258
- if ( symbol . exports [ prototypeSymbol . name ] ) {
2258
+ const symbolExport = symbol . exports . get ( prototypeSymbol . name ) ;
2259
+ if ( symbolExport ) {
2259
2260
if ( node . name ) {
2260
2261
node . name . parent = node ;
2261
2262
}
2262
- file . bindDiagnostics . push ( createDiagnosticForNode ( symbol . exports [ prototypeSymbol . name ] . declarations [ 0 ] ,
2263
- Diagnostics . Duplicate_identifier_0 , prototypeSymbol . name ) ) ;
2263
+ file . bindDiagnostics . push ( createDiagnosticForNode ( symbolExport . declarations [ 0 ] , Diagnostics . Duplicate_identifier_0 , prototypeSymbol . name ) ) ;
2264
2264
}
2265
- symbol . exports [ prototypeSymbol . name ] = prototypeSymbol ;
2265
+ symbol . exports . set ( prototypeSymbol . name , prototypeSymbol ) ;
2266
2266
prototypeSymbol . parent = symbol ;
2267
2267
}
2268
2268
0 commit comments