@@ -395,7 +395,7 @@ namespace ts {
395395 }
396396 }
397397
398- return substituteConstantValue ( node ) ;
398+ return node ;
399399 }
400400
401401 function substituteElementAccessExpression ( node : ElementAccessExpression ) {
@@ -410,39 +410,9 @@ namespace ts {
410410 }
411411 }
412412
413- return substituteConstantValue ( node ) ;
414- }
415-
416- function substituteConstantValue ( node : PropertyAccessExpression | ElementAccessExpression ) : LeftHandSideExpression {
417- const constantValue = tryGetConstEnumValue ( node ) ;
418- if ( constantValue !== undefined ) {
419- const substitute = createLiteral ( constantValue ) ;
420- setSourceMapRange ( substitute , node ) ;
421- setCommentRange ( substitute , node ) ;
422- if ( ! compilerOptions . removeComments ) {
423- const propertyName = isPropertyAccessExpression ( node )
424- ? declarationNameToString ( node . name )
425- : getTextOfNode ( node . argumentExpression ) ;
426- substitute . trailingComment = ` ${ propertyName } ` ;
427- }
428-
429- setConstantValue ( node , constantValue ) ;
430- return substitute ;
431- }
432-
433413 return node ;
434414 }
435415
436- function tryGetConstEnumValue ( node : Node ) : number {
437- if ( compilerOptions . isolatedModules ) {
438- return undefined ;
439- }
440-
441- return isPropertyAccessExpression ( node ) || isElementAccessExpression ( node )
442- ? resolver . getConstantValue ( < PropertyAccessExpression | ElementAccessExpression > node )
443- : undefined ;
444- }
445-
446416 function substituteCallExpression ( node : CallExpression ) : Expression {
447417 const expression = node . expression ;
448418 if ( isSuperProperty ( expression ) ) {
0 commit comments