TypeDoc generates blank documentation

This issue has been tracked since 2023-02-24.

Search terms

Express JS, Node JS, Blank Documentation

Question

I'm trying to document my Express JS API using TypeDoc, but I get a rather empty documentation generated.
image

This is my API file structure
image

This is my tsconfig.json:

 {
  "compilerOptions": {
    "target": "es5", 
    "module": "commonjs",
    "moduleResolution": "node", 
    "esModuleInterop": true, 
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true
  },
  "typedocOptions": {
    "entryPoints": ["server.ts"],
    "out": "docs"
  }
}

What am I doing wrong? All materials on the web point to adding the TypeDoc option {"mode": "modules}. But that's been deprecated. I would appreciate any guidance.

Gerrit0 wrote this answer on 2023-03-05

TypeDoc is really meant to document libraries -- not applications. It only documents what you export from your entry points, so if you don't export anything from server.ts, there won't be anything to document from TypeDoc's point of view.

FadhiliNjagi wrote this answer on 2023-03-05

I exported my Express app instance in my server.ts and tweaked my typedoc.json. This way, I was able to get half-decent documentation.

{
  "entryPoints": ["server.ts", "src/**/*.ts"],
  "out": "docs",
  "entryPointStrategy": "expand",
  "plugin": ["typedoc-theme-hierarchy"],
  "theme": "hierarchy",
  "name": "My Awesome API",
  "includeVersion": true,
  "exclude": ["**/node_modules/**/*.*", "**/dist/**/*.*"],
  "excludeExternals": true,
  "readme": "./README.md"
}
More Details About Repo
Owner Name TypeStrong
Repo Name typedoc
Full Name TypeStrong/typedoc
Language TypeScript
Created Date 2014-05-24
Updated Date 2023-03-19
Star Count 6487
Watcher Count 68
Fork Count 639
Issue Count 48

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date