I'm trying to generate documentation (using TypeDoc) of my application. I've got quite hard scenario to do. So in my code is some function which return object which has of type from node_modules/@types.
I need to include this type into my documentation because I need to show reference to this @type and I need to show this @type too. So I was trying those ways:
added path to this type in 'src' statement, e.g.:
'**/node_modules/@types/someType/index.d.ts'. My TypeDoc config for that:typedoc: { build: { options: { module: 'commonjs', out: '../MyDocumentation/', name: 'MyApp', target: 'es5', exclude: [ '**/folderA/*.d.ts', '**/folderB/*.d.ts' ], excludePrivate: true, externalPattern: "**/*/{fileX,fileY,fileZ}.ts", mode: 'file' }, src: [ 'folderA/*.ts', 'folderB/*.ts', '**/node_modules/@types/someType/*.d.ts' ] } }by set includeDeclarations as true. My TypeDoc config for that:
typedoc: { build: { options: { module: 'commonjs', out: '../MyDocumentation/', name: 'MyApp', target: 'es5', exclude: [ '**/node_modules/**', '**/folderA/*.d.ts', '**/folderB/*.d.ts' ], includeDeclarations: true, excludePrivate: true, externalPattern: "**/*/{fileX,fileY,fileZ}.ts", mode: 'file' }, src: [ 'folderA/*.ts', 'folderB/*.ts', ] } }
First way had been ignored. I thought at the first look that the second is working well but I observed something. I observed that the full of node_modules had been including into my documentation. But I don't need all of node_modules into my documentation. I need only this one type.
I'm so disappointed because without includeDeclarations my documentation cannot to find node_modules type but with it - is including a lot of redundant code.
Is any way to do it?
I'm looking for a way how to include my @type but without a rest of node_modules.
I was asking 2 days ago at GitHub in TypeDoc repository but without answer yet so I decided to create a question here.