Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of module won't display #515

Open
Xkonti opened this issue Aug 22, 2020 · 0 comments
Open

Description of module won't display #515

Xkonti opened this issue Aug 22, 2020 · 0 comments

Comments

@Xkonti
Copy link

Xkonti commented Aug 22, 2020

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 description
  • subscribers-set.ts - will display the description
  • time-helpers.ts - will display the description
  • collections-helpers.ts and subscribers-set.ts - WON'T display the description
  • collections-helpers.ts and time-helpers.ts - WON'T display the description
  • subscribers-set.ts and time-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
  }
}
@Xkonti Xkonti changed the title Description of module don't display Description of module won't display Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant