@@ -2043,7 +2043,7 @@ var TypeDoc;
20432043
20442044 var parent = state . parentState . reflection ;
20452045 var reflection = new TypeDoc . Models . DeclarationReflection ( ) ;
2046- reflection . name = ( state . flattenedName ? state . flattenedName + '.' : '' ) + state . getName ( ) ;
2046+ reflection . name = state . getReflectionName ( ) ;
20472047 reflection . originalName = state . declaration . name ;
20482048 reflection . parent = parent ;
20492049
@@ -2114,7 +2114,7 @@ var TypeDoc;
21142114
21152115 Dispatcher . EVENT_CREATE_REFLECTION = 'createReflection' ;
21162116
2117- Dispatcher . EVENT_MERGE_REFLECTION = Dispatcher . EVENT_MERGE_REFLECTION ;
2117+ Dispatcher . EVENT_MERGE_REFLECTION = 'mergeReflection' ;
21182118
21192119 Dispatcher . EVENT_BEGIN_DECLARATION = 'beginDeclaration' ;
21202120
@@ -2290,7 +2290,7 @@ var TypeDoc;
22902290 var reflection = null ;
22912291 var name = BaseState . getName ( declaration ) ;
22922292 this . reflection . children . some ( function ( child ) {
2293- if ( child . name != name )
2293+ if ( child . originalName != name )
22942294 return false ;
22952295 if ( ( child . flags & TypeScript . PullElementFlags . Static ) != ( declaration . flags & TypeScript . PullElementFlags . Static ) )
22962296 return false ;
@@ -2342,8 +2342,7 @@ var TypeDoc;
23422342 }
23432343
23442344 if ( state . isFlattened ) {
2345- // state.parentState = this.parentState;
2346- state . flattenedName = this . flattenedName + '.' + declaration . name ;
2345+ state . flattenedName = this . flattenedName + '.' + state . getName ( ) ;
23472346 }
23482347
23492348 return state ;
@@ -2374,6 +2373,20 @@ var TypeDoc;
23742373 state . isInherited = true ;
23752374 return state ;
23762375 } ;
2376+
2377+ DeclarationState . prototype . getReflectionName = function ( ) {
2378+ if ( this . flattenedName ) {
2379+ if ( this . kindOf ( TypeScript . PullElementKind . CallSignature ) ) {
2380+ return this . flattenedName + '()' ;
2381+ } else if ( this . kindOf ( TypeScript . PullElementKind . IndexSignature ) ) {
2382+ return this . flattenedName + '[]' ;
2383+ } else {
2384+ return this . flattenedName + '.' + this . getName ( ) ;
2385+ }
2386+ } else {
2387+ return this . getName ( ) ;
2388+ }
2389+ } ;
23772390 return DeclarationState ;
23782391 } ) ( Factories . BaseState ) ;
23792392 Factories . DeclarationState = DeclarationState ;
@@ -3990,22 +4003,14 @@ var TypeDoc;
39904003 state . reflection . kind = Factories . ReflectionHandler . mergeKinds ( state . reflection . kind , TypeScript . PullElementKind . ObjectLiteral ) ;
39914004 literal . getChildDecls ( ) . forEach ( function ( declaration ) {
39924005 var childState = state . createChildState ( declaration ) ;
3993-
39944006 _this . dispatcher . processState ( childState ) ;
3995- if ( childState . reflection && childState . kindOf ( TypeScript . PullElementKind . IndexSignature ) ) {
3996- childState . reflection . name = state . reflection . name + ' index signature' ;
3997- }
39984007 } ) ;
39994008 } else {
40004009 literal . getChildDecls ( ) . forEach ( function ( declaration ) {
40014010 var childState = state . createChildState ( declaration ) ;
40024011 childState . isFlattened = true ;
40034012 childState . flattenedName = state . flattenedName ? state . flattenedName + '.' + state . declaration . name : state . getName ( ) ;
4004-
40054013 _this . dispatcher . processState ( childState ) ;
4006- if ( childState . reflection && childState . kindOf ( TypeScript . PullElementKind . IndexSignature ) ) {
4007- childState . reflection . name = state . reflection . name + ' index signature' ;
4008- }
40094014 } ) ;
40104015 }
40114016
0 commit comments