@@ -1592,9 +1592,10 @@ function insertMethodMacros(template, methodObj, platformApi, appApi, templates,
15921592
15931593 let eventParams = event . params && event . params . length ? getTemplate ( '/sections/parameters' , templates ) + event . params . map ( p => insertParameterMacros ( getTemplate ( '/parameters/default' , templates ) , p , event , currentModuleApiForEvent ) ) . join ( '' ) : ''
15941594 const eventForSubscriber = getNotifierForMethod ( method , appApi )
1595- let eventParams2 = ( eventForSubscriber && eventForSubscriber . params && eventForSubscriber . params . length ) ? getTemplate ( '/sections/parameters' , templates ) + eventForSubscriber . params . map ( p => insertParameterMacros ( getTemplate ( '/parameters/default' , templates ) , p , eventForSubscriber , appApi ) ) . join ( ', ' ) : ''
1595+ let eventAllParams = ( eventForSubscriber && eventForSubscriber . params && eventForSubscriber . params . length ) ? getTemplate ( '/sections/parameters' , templates ) + eventForSubscriber . params . map ( p => insertParameterMacros ( getTemplate ( '/parameters/default' , templates ) , p , eventForSubscriber , appApi ) ) . join ( ', ' ) : ''
15961596
15971597 if ( isGeneratingDocs ( languages ) ) {
1598+ eventAllParams = isEventMethod ( methodObj ) && event . result ? Types . getMethodSignatureResult ( event , currentModuleApiForEvent , { callback : true , namespace : ! config . copySchemasIntoModules } ) : ''
15981599 // If there's a notifier for this method, and it has examples, use its params for the eventParams section
15991600 if ( eventForSubscriber && eventForSubscriber . examples && eventForSubscriber . examples . length ) {
16001601 eventParams = ( eventForSubscriber . params && eventForSubscriber . params . length ) ?
@@ -1799,7 +1800,7 @@ function insertMethodMacros(template, methodObj, platformApi, appApi, templates,
17991800 . replace ( / \$ \{ m e t h o d \. r e s u l t \. t y p e \} / g, Types . getSchemaType ( result . schema , platformApi , { templateDir : state . typeTemplateDir , title : true , asPath : false , result : true , namespace : false } ) ) //, baseUrl: options.baseUrl
18001801 . replace ( / \$ \{ m e t h o d \. r e s u l t \. j s o n \} / g, Types . getSchemaType ( result . schema . type === 'null' ? getNonNullSchema ( methodObj , event , platformApi , appApi ) : result . schema , platformApi , { templateDir : 'json-types' , title : true , code : false , link : false , asPath : false , expandEnums : false , namespace : true } ) )
18011802 // todo: what does prefix do?
1802- . replace ( / \$ \{ e v e n t \. r e s u l t \. t y p e \} / g, isEventMethod ( methodObj ) && eventParams2 ? eventParams2 : '' )
1803+ . replace ( / \$ \{ e v e n t \. r e s u l t \. t y p e \} / g, isEventMethod ( methodObj ) && eventAllParams ? eventAllParams : '' )
18031804 . replace ( / \$ \{ e v e n t \. r e s u l t \. j s o n \. t y p e \} / g, resultJsonType )
18041805 . replace ( / \$ \{ e v e n t \. r e s u l t \. j s o n \. t y p e \} / g, callbackResultJsonType )
18051806 . replace ( / \$ \{ e v e n t \. p u l l s \. p a r a m \. n a m e \} / g, pullsEventParamName )
0 commit comments