@@ -337,23 +337,24 @@ export function parseSourceFile(file: ts.SourceFile): ParsedSourceFile {
337337 function exportDeclarationWalker ( node : ts . ExportDeclaration ) {
338338 debug ( 'exportDeclarationWalker' , node . exportClause ?. getFullText ( ) ) ;
339339 node . exportClause && ( node . exportClause as ts . NamedExports ) . elements . forEach ( identifier => {
340- const idName = identifier . name . escapedText ;
340+ const asName = identifier . name . escapedText ;
341+ const idName = identifier . propertyName ?. escapedText || asName ;
341342 debug ( 'exportDeclarationWalker' , idName ) ;
342343 const foundClassByIdentifier = result . classes . find ( klass => klass . name === idName ) ;
343344 if ( foundClassByIdentifier ) {
344- result . exportClass = foundClassByIdentifier ;
345+ result . exportClass = { ... foundClassByIdentifier , name : asName } ;
345346 }
346347 const foundFunctionByIdentifier = result . functions . find ( func => func . name === idName ) ;
347348 if ( foundFunctionByIdentifier ) {
348- result . exportFunctions . push ( foundFunctionByIdentifier ) ;
349+ result . exportFunctions . push ( { ... foundFunctionByIdentifier , name : asName } ) ;
349350 }
350351 const foundPojoByIdentifier = result . pojos . find ( pojo => pojo . name === idName ) ;
351352 if ( foundPojoByIdentifier ) {
352- result . exportPojos . push ( foundPojoByIdentifier ) ;
353+ result . exportPojos . push ( { ... foundPojoByIdentifier , name : asName } ) ;
353354 }
354355 const foundComponentByIdentifier = result . components . find ( component => component . name === idName ) ;
355356 if ( foundComponentByIdentifier ) {
356- result . exportComponents . push ( foundComponentByIdentifier ) ;
357+ result . exportComponents . push ( { ... foundComponentByIdentifier , name : asName } ) ;
357358 }
358359 } ) ;
359360 }
0 commit comments