GeezerVison is showing github.com — TypeScript config no longer validates after upgrading to typedoc 0.28.0 · Issue #2901 · TypeStrong/typedoc
TypeScript config no longer validates after upgrading to typedoc 0.28.0 #2901
Description
Search terms
TypeScript
Expected Behavior
Config should continue to validate.
Actual Behavior
typedoc.config.js:4:7 - error TS2322: Type '{ classPropertiesFormat: "table"; entryFileName: string; entryPoints: string[]; entryPointStrategy: "packages"; enumMembersFormat: "table"; hideBreadcrumbs: true; hidePageHeader: true; ignoredHighlightLanguages: string[]; ... 10 more ...; useHTMLEncodedBrackets: true; }' is not assignable to type 'TypeDocOptions & PluginOptions'.
Type '{ classPropertiesFormat: "table"; entryFileName: string; entryPoints: string[]; entryPointStrategy: "packages"; enumMembersFormat: "table"; hideBreadcrumbs: true; hidePageHeader: true; ignoredHighlightLanguages: string[]; ... 10 more ...; useHTMLEncodedBrackets: true; }' is missing the following properties from type 'TypeDocOptions': options, tsconfig, compilerOptions, lang, and 97 more.
4 const config = {
~~~~~~
Found 1 error in typedoc.config.js:4
Steps to reproduce the bug
Write a config and validate it against TypeDocOptions.
Environment
- Typedoc version: 0.28.0
- TypeScript version: 5.8.2
- Node.js version: 22.14.0
Activity
Gerrit0 commented on Mar 17, 2025
It sounds like you have declared the type to be TypeDocOptions, where you want Partial<TypeDocOptions>, this is a mistake in your config file, not a problem with typedoc.
kaiyoma commented on Mar 17, 2025
Did this behavior change? This wasn't the case in the previous version. Shouldn't TypeDocOptions already be declaring all properties as optional? That seems more user-friendly than forcing everyone to add Partial to their configs.
Gerrit0 commented on Mar 17, 2025
This behavior has not changed. I suspect your PluginOptions interface might have resolved to any before, resulting in the entire type being any.
As for everything being optional, it looks like that's doable, most places in TypeDoc's source already wrap it in Partial, PR welcome
added a commit that references this issue
on Mar 18, 2025This issue will close once commit 00fb078 is merged into the 'master' branch.00fb078 kaiyoma commented on Mar 18, 2025
Metadata
Metadata
Development
No branches or pull requestsIssue actions