* Hooks substitutions for non-expression identifiers.
(node)
| 101522 | * Hooks substitutions for non-expression identifiers. |
| 101523 | */ |
| 101524 | function substituteIdentifier(node) { |
| 101525 | // Only substitute the identifier if we have enabled substitutions for block-scoped |
| 101526 | // bindings. |
| 101527 | if (enabledSubstitutions & 2 /* ES2015SubstitutionFlags.BlockScopedBindings */ && !ts.isInternalName(node)) { |
| 101528 | var original = ts.getParseTreeNode(node, ts.isIdentifier); |
| 101529 | if (original && isNameOfDeclarationWithCollidingName(original)) { |
| 101530 | return ts.setTextRange(factory.getGeneratedNameForNode(original), node); |
| 101531 | } |
| 101532 | } |
| 101533 | return node; |
| 101534 | } |
| 101535 | /** |
| 101536 | * Determines whether a name is the name of a declaration with a colliding name. |
| 101537 | * NOTE: This function expects to be called with an original source tree node. |
no test coverage detected