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

TypeDocOptions seems to be missing Partial for packageOptions #2878

Closed
kaiyoma opened this issue Feb 27, 2025 · 5 comments
Closed

TypeDocOptions seems to be missing Partial for packageOptions #2878

kaiyoma opened this issue Feb 27, 2025 · 5 comments
Milestone

Comments

@kaiyoma
Copy link

kaiyoma commented Feb 27, 2025

Search terms

TypeScript, TypeDocOptions, packageOptions

Expected Behavior

packageOptions should be defined as Partial.

Actual Behavior

error TS2740: Type '{ entryPoints: string[]; includeVersion: true; }' is missing the following properties from type 'TypeDocOptions': options, tsconfig, compilerOptions, plugin, and 100 more.

Steps to reproduce the bug

const config: TypeDocOptions = {
  entryPoints: [],
  entryPointStrategy: 'packages',
  packageOptions: {
    entryPoints: ['src/index.ts'],
    includeVersion: true,
  },
};

Environment

  • Typedoc version: 0.27.9
  • TypeScript version: 5.7.3
  • Node.js version: 22.14.0
Gerrit0 added a commit that referenced this issue Feb 28, 2025
@Gerrit0 Gerrit0 added this to the v0.28.0 milestone Feb 28, 2025
@kaiyoma
Copy link
Author

kaiyoma commented Feb 28, 2025

Another issue with the types here (that should be addressed at the same time) is that not all options are applicable to packages, so those should be removed from the types. Currently, vscode is giving me autocomplete suggestions for options that only exist at the root.

Gerrit0 added a commit that referenced this issue Mar 1, 2025
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 1, 2025

The options exist in both places, they simply don't have any effect when set there (unless some plugin forces rendering at each package level). I agree it makes sense to do this.

@kaiyoma
Copy link
Author

kaiyoma commented Mar 13, 2025

@Gerrit0 Does your fix also address tableColumnSettings? I'm seeing the same problem there, where I can't specify only one property.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 14, 2025

That's not a typedoc option, so it's up to whatever plugin you're using to correctly specify it.

@kaiyoma
Copy link
Author

kaiyoma commented Mar 14, 2025

Oh, I guess it's a question for @tgreyuk then (it's a Markdown option: https://typedoc-plugin-markdown.org/docs/options/display-options#tablecolumnsettings).

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

2 participants