@@ -469,8 +469,8 @@ function renderMethod(member, parent, output, name) {
469
469
470
470
if ( arg . type . expression === '[string]|[path]' ) {
471
471
let argName = translateMemberName ( 'argument' , arg . name , null ) ;
472
- pushArg ( "string" , argName , arg ) ;
473
- pushArg ( "string" , `${ argName } Path` , arg ) ;
472
+ pushArg ( "string" , ` ${ argName } = null` , arg ) ;
473
+ pushArg ( "string" , `${ argName } Path = null ` , arg ) ;
474
474
if ( arg . spec ) {
475
475
addParamsDoc ( argName , XmlDoc . renderTextOnly ( arg . spec , maxDocumentationColumnWidth ) ) ;
476
476
addParamsDoc ( `${ argName } Path` , [ `Instead of specifying <paramref name="${ argName } "/>, gives the file name to load from.` ] ) ;
@@ -691,6 +691,13 @@ function translateType(type, parent, generateNameCallback = t => t.name) {
691
691
}
692
692
}
693
693
694
+ if ( type . templates ) {
695
+ // this should mean we have a generic type and we can translate that
696
+ /** @type {string[] } */
697
+ var types = type . templates . map ( template => translateType ( template , parent ) ) ;
698
+ return `${ type . name } <${ types . join ( ', ' ) } >`
699
+ }
700
+
694
701
// there's a chance this is a name we've already seen before, so check
695
702
// this is also where we map known types, like boolean -> bool, etc.
696
703
let name = classNameMap . get ( type . name ) || type . name ;
0 commit comments