Description of module won't display
Xkonti opened this issue · comments
Xkonti commented
TLDR:
When there is one module containing at least 2 files and one of those files contains a function, the module's description won't show up in the module's docs.
Setup
Lets say we have three files:
collections-helpers.ts
:
export function pickRandom<T>(collection: T[]): T | undefined { ... }
function doTimes<T>(times: number, action: (index: number) => T): T[] { ... }
subscribers-set.ts
:
export class SubscribersSet<T> implements Iterable<T> { ... }
time-helpers.ts
:
export async function delay(ms: number): Promise<void> { ... }
When problem happens
When I'll add the collections-helpers.ts
to the module with any other file, the module description won't show up.
A module containing:
collections-helpers.ts
- will display the descriptionsubscribers-set.ts
- will display the descriptiontime-helpers.ts
- will display the descriptioncollections-helpers.ts
andsubscribers-set.ts
- WON'T display the descriptioncollections-helpers.ts
andtime-helpers.ts
- WON'T display the descriptionsubscribers-set.ts
andtime-helpers.ts
- WON'T display the description
I have other module that doesn't have this functions only file problem and then the module description is displayed just fine.
Environment:
package.json:
"scripts": {
"docs": "typedoc --tsconfig"
},
"dependencies": {
"@nestjs/common": "^7.4.2",
"@nestjs/config": "^0.5.0",
"@nestjs/core": "^7.4.2",
"@nestjs/platform-express": "^7.4.2",
"faker": "^4.1.0",
"node-fetch": "^2.6.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^6.6.2"
},
"devDependencies": {
"@nestjs/cli": "^7.4.0",
"@nestjs/schematics": "^7.0.0",
"@nestjs/testing": "^7.4.0",
"@types/express": "^4.17.0",
"@types/faker": "^4.1.12",
"@types/jest": "^26.0.0",
"@types/node": "^14.0.0",
"@types/supertest": "^2.0.10",
"@typescript-eslint/eslint-plugin": "^3.9.0",
"@typescript-eslint/parser": "^3.9.0",
"eslint": "^7.7.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"jest": "^26.4.0",
"prettier": "^2.0.0",
"supertest": "^4.0.0",
"ts-jest": "26.2.0",
"ts-loader": "^8.0.0",
"ts-node": "^8.10.0",
"tsconfig-paths": "^3.9.0",
"typedoc": "0.18.0",
"typedoc-plugin-external-module-name": "4.0.3",
"typescript": "^3.9.7"
}
tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es2018",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"strictNullChecks": true
},
"typedocOptions": {
"inputFiles": ["./src"],
"mode": "modules",
"out": "docs",
"exclude": "**/*+(index|.spec|.e2e).ts",
"excludePrivate": true,
"excludeExternals": true,
"stripInternal": true,
"name": "HubHazard Core",
"includeVersion": true
}
}