#TypeDoc is unable to locate entrypoints

17 messages · Page 1 of 1 (latest)

proven axle
#

I am using TypeDoc v0.22.18 with TS v4.1.3. I am trying to generate documentation, but i receive warnings (as on screenshot) and some modules are skipped (for example src/database/utils/queryBuilder.ts, which has exports, so it should be picked).

I run typedoc with command:

node_modules/.bin/typedoc --plugin none --tsconfig ./tsconfig.jsdoc.json ./src

typedoc.json

{
    "entryPointStrategy": "expand",
    "exclude": ["./src/**/__mocks__/**", "./src/frontend/assets/**"],
    "out": "./ts-api-docs"
}

tsconfig.json

{
  "exclude": ["./node_modules", "./dist", "./src/database/data"],
  "include": ["./src/**/__mocks__"],
  "references": [
    { "path": "./tsconfig.backend.json" }
  ],
  "files": ["./src/augmentations.d.ts"],
  "compilerOptions": {
    "strict": true,
    "target": "ES2020",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "baseUrl": ".",
    "paths": {
      "@root/*": ["*"],
      "@src/*": ["src/*"],
      "@unitTests/*": ["test/unit/*"],
      "@frontend/*": ["src/frontend/*"],
      "@middleware/*": ["src/middleware/*"],
      "@database/*": ["src/database/*"],
      "@commons/*": ["commons/*"]
    }
  }
}

tsconfig.jsdoc.json

{
    "extends": "./tsconfig.json",
    "include": ["./**/*.ts?", "./**/*.js?"],
    "files": ["./src/augmentations.d.ts", "./src/database/populate/populate.ts"],
    "compilerOptions": {
        "outDir": "_tmp-compiled-scripts-for-docs",
        "skipLibCheck": true,
        "allowJs": true,
        "jsx": "react"
    }
}
proven axle
#

I modified tsconfig.jsdoc.json and TypeDoc now finds lacking modules, but it throws even more warning about types "defined, but not included in documentation".

- "include": ["./**/*.ts?", "./**/*.js?"],
+ "include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.js", "./src/**/*.jsx", "./commons/**/*.ts"],

So i have a few questions:


Also, typedoc-plugin-markdown ignores annotations i make in code (like @example) - when i don't use markdown plugin, then my annotations appear, but with markdown they don't. I don't see anything related to this behavior in docs https://www.npmjs.com/package/typedoc-plugin-markdown?activeTab=readme#options

vapid root
#

That include section is handled completely by typescript - I'd guess it doesn't support ? (maybe? I've never tried, maybe it means something else to TS)

The export warnings mean you didn't export something that consumers of that module need in order to use your exported type, if you export what it's complaining about, the warning will go away.

Markdown sounds like a bug with that plugin, which is odd since a ton of people use it... might be fixed in a newer version?

proven axle
#

That include section is handled completely by typescript - I'd guess it doesn't support ? (maybe? I've never tried, maybe it means something else to TS)
TypeScript supports it https://www.typescriptlang.org/tsconfig#include , but maybe there's some bug, i don't know
? matches any one character (excluding directory separators)

The export warnings mean you didn't export something that consumers of that module need in order to use your exported type, if you export what it's complaining about, the warning will go away.
Yeah, i read it in your comment on GitHub 🙂 Though i think it would be less confusing if it was stated in TypeDoc docs (as some "note" or "aside")

Markdown sounds like a bug with that plugin, which is odd since a ton of people use it... might be fixed in a newer version?
From what i see is that for example @module tag is picked, but other tags aren't (even plain text in doc comment is not picked - see attached screenshot). Unfortunately, i can't update to newer version, because it requires newer TS version, which i also can't update, because it would require to update whole of my app's codebase 😦

vapid root
#

That meaning of ? implies that it would NOT match .js, only .jsx, .jsa... which is not how globs normally work (for sh-style shells anyways)

#

Kind of looks like the markdown plugin doesn't even try to render comments for modules?

proven axle
proven axle
vapid root
proven axle
#

Now i just have to deal with that missing exports. typedoc-plugin-missing-exports doesn't seem to fix the issue though 🤔

#

(maybe it's again some version mismatch)

proven axle
#

Ok, so after downgrading typedoc-plugin-missing-exports to version0.22.6 (before it started supporting both typedoc 0.22.x and 0.23.x) warnings are gone, but non exported declarations are still not picked to docs

> node_modules/.bin/typedoc --plugin typedoc-plugin-markdown --plugin typedoc-plugin-missing-exports --tsconfig ./tsconfig.jsdoc.json ./src

Info: Loaded plugin typedoc-plugin-markdown
Info: Loaded plugin typedoc-plugin-missing-exports
Info: Documentation generated at ./ts-api-docs

Am i missing something?

proven axle
#

Ok, so i think i fixed most issues, by:

Now i just have to limit the number of modules in documentation to only those, which actually document my API (instead of whole app) and merge generated docs to a single .md file. I guess i will handle it.