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

Typedoc does not respect the extends semantics of tsconfig.json #2334

Closed
StevenEWright opened this issue Jul 12, 2023 · 3 comments
Closed

Typedoc does not respect the extends semantics of tsconfig.json #2334

StevenEWright opened this issue Jul 12, 2023 · 3 comments
Labels
bug Functionality does not match expectation help wanted Contributions are especially encouraged

Comments

@StevenEWright
Copy link

Search terms

  • tsconfig.json
  • extends
  • typedocOptions

Expected Behavior

When looking for typedocOptions in tsconfig.json files, typedoc should respect the semantics of tsconfig.json by honoring the extends property per https://www.typescriptlang.org/tsconfig/extends.html

Actual Behavior

Currently, in src/lib/utils/tsconfig.ts, there is no affordance for resolving the complete contents of tsconfig.json in the case where an extends property is present.

Steps to reproduce the bug

  • Start with any project which currently works as expected with typedoc and specifies typedocOptions in a tsconfig.json.
  • Copy the contents of the existing tsconfig.json to a new file (such as tsconfig.base.json)
  • Replace the contents of the existing tsconfig.json with { 'extends': 'tsconfig.base.json' }
  • Observe that typedoc no longer respects the settings in the extended config.

Environment

  • Typedoc version: typedoc@0.24.7
  • TypeScript version: ^5.0.0
  • Node.js version: 16
  • OS: macOS
@StevenEWright StevenEWright added the bug Functionality does not match expectation label Jul 12, 2023
@Gerrit0 Gerrit0 added the help wanted Contributions are especially encouraged label Jul 12, 2023
@Ainias
Copy link

Ainias commented Jan 11, 2024

@Gerrit0 While the typedoc-options may now be working, the other tsconfig-options are not working. I have a base tsconfig with paths, which are not resolved if I specify the extending tsconfig. The paths are resolved if I specify the base tsconfig.
Should I open a new bug or should we reopen this bug?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 11, 2024

That's a different issue - and one that'll definitely need a reproduction, since I have test cases which shows that TypeDoc does inherit tsconfig options properly.

@Ainias
Copy link

Ainias commented Jan 11, 2024

You are correct. In my project I get an error, because the include is different and therefore it has no types for .scss-files and it cannot resolve those files. It has nothing to do with the paths.
Sorry for the wrong bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

3 participants