@@ -1478,7 +1478,7 @@ var TypeDoc;
14781478 var len = basePath . length ;
14791479
14801480 while ( basePath != dirname . substr ( 0 , len ) ) {
1481- if ( len < = dirname . length ) {
1481+ if ( len > = dirname . length ) {
14821482 return ;
14831483 }
14841484
@@ -1926,6 +1926,7 @@ var TypeDoc;
19261926 var parent = state . parentState . reflection ;
19271927 var reflection = new TypeDoc . Models . DeclarationReflection ( ) ;
19281928 reflection . name = ( state . flattenedName ? state . flattenedName + '.' : '' ) + state . getName ( ) ;
1929+ reflection . originalName = state . declaration . name ;
19291930 reflection . parent = parent ;
19301931
19311932 state . reflection = reflection ;
@@ -2572,6 +2573,74 @@ var TypeDoc;
25722573 var Factories = TypeDoc . Factories ;
25732574} ) ( TypeDoc || ( TypeDoc = { } ) ) ;
25742575var TypeDoc ;
2576+ ( function ( TypeDoc ) {
2577+ ( function ( Factories ) {
2578+ /**
2579+ * A handler that moves comments with dot syntax to their target.
2580+ */
2581+ var DeepCommentHandler = ( function ( _super ) {
2582+ __extends ( DeepCommentHandler , _super ) ;
2583+ /**
2584+ * Create a new CommentHandler instance.
2585+ *
2586+ * @param dispatcher The dispatcher this handler should be attached to.
2587+ */
2588+ function DeepCommentHandler ( dispatcher ) {
2589+ _super . call ( this , dispatcher ) ;
2590+
2591+ dispatcher . on ( Factories . Dispatcher . EVENT_DECLARATION , this . onDeclaration , this , - 512 ) ;
2592+ }
2593+ /**
2594+ * Triggered when the dispatcher starts processing a declaration.
2595+ *
2596+ * @param state The state that describes the current declaration and reflection.
2597+ */
2598+ DeepCommentHandler . prototype . onDeclaration = function ( state ) {
2599+ var reflection = state . reflection ;
2600+ if ( reflection . comment ) {
2601+ return ;
2602+ }
2603+
2604+ function push ( reflection ) {
2605+ var part = reflection . originalName ;
2606+ if ( reflection . isSignature ) {
2607+ part = '' ;
2608+ }
2609+
2610+ if ( part && part != '' ) {
2611+ name = ( name == '' ? part : part + '.' + name ) ;
2612+ }
2613+ }
2614+
2615+ var name = '' ;
2616+ var target = reflection . parent ;
2617+ push ( reflection ) ;
2618+
2619+ while ( target instanceof TypeDoc . Models . DeclarationReflection ) {
2620+ if ( target . comment ) {
2621+ var tag = target . comment . getTag ( 'param' , name ) ;
2622+ if ( tag ) {
2623+ target . comment . tags . splice ( target . comment . tags . indexOf ( tag ) , 1 ) ;
2624+ reflection . comment = new TypeDoc . Models . Comment ( '' , tag . text ) ;
2625+ break ;
2626+ }
2627+ }
2628+
2629+ target = target . parent ;
2630+ }
2631+ } ;
2632+ return DeepCommentHandler ;
2633+ } ) ( Factories . BaseHandler ) ;
2634+ Factories . DeepCommentHandler = DeepCommentHandler ;
2635+
2636+ /**
2637+ * Register this handler.
2638+ */
2639+ Factories . Dispatcher . HANDLERS . push ( DeepCommentHandler ) ;
2640+ } ) ( TypeDoc . Factories || ( TypeDoc . Factories = { } ) ) ;
2641+ var Factories = TypeDoc . Factories ;
2642+ } ) ( TypeDoc || ( TypeDoc = { } ) ) ;
2643+ var TypeDoc ;
25752644( function ( TypeDoc ) {
25762645 ( function ( Factories ) {
25772646 /**
@@ -2931,14 +3000,14 @@ var TypeDoc;
29313000 function FunctionTypeHandler ( dispatcher ) {
29323001 _super . call ( this , dispatcher ) ;
29333002
2934- dispatcher . on ( Factories . Dispatcher . EVENT_DECLARATION , this . onDeclaration , this , - 256 ) ;
3003+ dispatcher . on ( Factories . Dispatcher . EVENT_END_DECLARATION , this . onEndDeclaration , this ) ;
29353004 }
29363005 /**
2937- * Triggered when the dispatcher processes a declaration.
3006+ * Triggered when the dispatcher has finished processing a declaration.
29383007 *
29393008 * @param state The state that describes the current declaration and reflection.
29403009 */
2941- FunctionTypeHandler . prototype . onDeclaration = function ( state ) {
3010+ FunctionTypeHandler . prototype . onEndDeclaration = function ( state ) {
29423011 if ( state . isSignature ) {
29433012 return ;
29443013 }
@@ -3578,14 +3647,14 @@ var TypeDoc;
35783647 function ObjectLiteralHandler ( dispatcher ) {
35793648 _super . call ( this , dispatcher ) ;
35803649
3581- dispatcher . on ( Factories . Dispatcher . EVENT_DECLARATION , this . onDeclaration , this , 1024 ) ;
3650+ dispatcher . on ( Factories . Dispatcher . EVENT_END_DECLARATION , this . onEndDeclaration , this ) ;
35823651 }
35833652 /**
3584- * Triggered when the dispatcher starts processing a declaration.
3653+ * Triggered when the dispatcher has finished processing a declaration.
35853654 *
35863655 * @param state The state that describes the current declaration and reflection.
35873656 */
3588- ObjectLiteralHandler . prototype . onDeclaration = function ( state ) {
3657+ ObjectLiteralHandler . prototype . onEndDeclaration = function ( state ) {
35893658 var _this = this ;
35903659 var literal = ObjectLiteralHandler . getLiteralDeclaration ( state . declaration ) ;
35913660 if ( literal && literal . getChildDecls ( ) . length > 0 ) {
0 commit comments