@@ -79,7 +79,6 @@ import {
7979 EmitNode ,
8080 emptyArray ,
8181 EmptyStatement ,
82- EndOfDeclarationMarker ,
8382 EndOfFileToken ,
8483 EntityName ,
8584 EnumDeclaration ,
@@ -121,6 +120,7 @@ import {
121120 getLineAndCharacterOfPosition ,
122121 getNameOfDeclaration ,
123122 getNodeId ,
123+ getNonAssignedNameOfDeclaration ,
124124 getSourceMapRange ,
125125 getSyntheticLeadingComments ,
126126 getSyntheticTrailingComments ,
@@ -298,7 +298,6 @@ import {
298298 MemberName ,
299299 memoize ,
300300 memoizeOne ,
301- MergeDeclarationMarker ,
302301 MetaProperty ,
303302 MethodDeclaration ,
304303 MethodSignature ,
@@ -946,8 +945,6 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
946945 updatePartiallyEmittedExpression,
947946 createCommaListExpression,
948947 updateCommaListExpression,
949- createEndOfDeclarationMarker,
950- createMergeDeclarationMarker,
951948 createSyntheticReferenceExpression,
952949 updateSyntheticReferenceExpression,
953950 cloneNode,
@@ -6210,30 +6207,6 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
62106207 : node ;
62116208 }
62126209
6213- /**
6214- * Creates a synthetic element to act as a placeholder for the end of an emitted declaration in
6215- * order to properly emit exports.
6216- */
6217- // @api
6218- function createEndOfDeclarationMarker ( original : Node ) {
6219- const node = createBaseNode < EndOfDeclarationMarker > ( SyntaxKind . EndOfDeclarationMarker ) ;
6220- node . emitNode = { } as EmitNode ;
6221- node . original = original ;
6222- return node ;
6223- }
6224-
6225- /**
6226- * Creates a synthetic element to act as a placeholder for the beginning of a merged declaration in
6227- * order to properly emit exports.
6228- */
6229- // @api
6230- function createMergeDeclarationMarker ( original : Node ) {
6231- const node = createBaseNode < MergeDeclarationMarker > ( SyntaxKind . MergeDeclarationMarker ) ;
6232- node . emitNode = { } as EmitNode ;
6233- node . original = original ;
6234- return node ;
6235- }
6236-
62376210 // @api
62386211 function createSyntheticReferenceExpression ( expression : Expression , thisArg : Expression ) {
62396212 const node = createBaseNode < SyntheticReferenceExpression > ( SyntaxKind . SyntheticReferenceExpression ) ;
@@ -6672,8 +6645,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
66726645 : reduceLeft ( expressions , factory . createComma ) ! ;
66736646 }
66746647
6675- function getName ( node : Declaration | undefined , allowComments ?: boolean , allowSourceMaps ?: boolean , emitFlags : EmitFlags = 0 ) {
6676- const nodeName = getNameOfDeclaration ( node ) ;
6648+ function getName ( node : Declaration | undefined , allowComments ?: boolean , allowSourceMaps ?: boolean , emitFlags : EmitFlags = 0 , ignoreAssignedName ?: boolean ) {
6649+ const nodeName = ignoreAssignedName ? node && getNonAssignedNameOfDeclaration ( node ) : getNameOfDeclaration ( node ) ;
66776650 if ( nodeName && isIdentifier ( nodeName ) && ! isGeneratedIdentifier ( nodeName ) ) {
66786651 // TODO(rbuckton): Does this need to be parented?
66796652 const name = setParent ( setTextRange ( cloneNode ( nodeName ) , nodeName ) , nodeName . parent ) ;
@@ -6710,9 +6683,10 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
67106683 * @param node The declaration.
67116684 * @param allowComments A value indicating whether comments may be emitted for the name.
67126685 * @param allowSourceMaps A value indicating whether source maps may be emitted for the name.
6686+ * @param ignoreAssignedName Indicates that the assigned name of a declaration shouldn't be considered.
67136687 */
6714- function getLocalName ( node : Declaration , allowComments ?: boolean , allowSourceMaps ?: boolean ) {
6715- return getName ( node , allowComments , allowSourceMaps , EmitFlags . LocalName ) ;
6688+ function getLocalName ( node : Declaration , allowComments ?: boolean , allowSourceMaps ?: boolean , ignoreAssignedName ?: boolean ) {
6689+ return getName ( node , allowComments , allowSourceMaps , EmitFlags . LocalName , ignoreAssignedName ) ;
67166690 }
67176691
67186692 /**
0 commit comments