@@ -21,7 +21,7 @@ export default class TypescriptSourceExtracter extends SourceExtracter {
2121 sourcePatterns ( ) {
2222 return this . sourceDirs . reduce ( ( files , dir ) => {
2323 let pattern = path . join ( dir , '**' , '*.ts' ) ;
24- return files . concat ( glob ( pattern ) ) ;
24+ return files . concat ( glob ( pattern , { cwd : this . baseDir } ) ) ;
2525 } , < string [ ] > [ ] ) ;
2626 }
2727
@@ -30,15 +30,15 @@ export default class TypescriptSourceExtracter extends SourceExtracter {
3030 let files = this . sourcePatterns ( ) ;
3131 let originalDir = process . cwd ( ) ;
3232 process . chdir ( this . baseDir ) ;
33- let app = new Application ( { tsconfig : path . join ( this . baseDir , 'tsconfig.json' ) , ignoreCompilerErrors : true } ) ;
33+ let app = new Application ( { ignoreCompilerErrors : true } ) ;
3434 let result = app . convert ( files ) ;
3535 process . chdir ( originalDir ) ;
3636 return result ;
3737 }
3838
3939 normalize ( project : ProjectReflection ) {
4040 debug ( `Transforming Typedoc output into Documenter standard format` ) ;
41- project . children . forEach ( ( file ) => {
41+ ( project . children || [ ] ) . forEach ( ( file ) => {
4242 ( file . children || [ ] ) . forEach ( ( item ) => {
4343 if ( item . flags . isExported ) {
4444 let packageName = this . getPackageName ( item ) ;
@@ -244,7 +244,7 @@ export default class TypescriptSourceExtracter extends SourceExtracter {
244244
245245 // Add any type args it might take, recursing into those types to render them properly
246246 if ( type . typeArguments ) {
247- displayType += '<' + type . typeArguments . map ( this . displayTypeFrom ) . join ( ', ' ) + '>' ;
247+ displayType += '<' + type . typeArguments . map ( this . displayTypeFrom . bind ( this ) ) . join ( ', ' ) + '>' ;
248248 }
249249
250250 return displayType ;
0 commit comments