-
Notifications
You must be signed in to change notification settings - Fork 700
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
Improve the "JSON" view to include generic parameters #2455
Comments
PR welcome! |
@Gerrit0 sorry to be a pain in the a** but I'd like to propose a PR and before that I need to understand how theme development works. But I can't even succeed at creating the most basic plugin that exposes a theme that inherit from the default one. I'm basing my work on the following documentation: https://github.com/TypeStrong/typedoc/blob/master/internal-docs/custom-themes.md
import { Application, DefaultTheme } from "typedoc";
export function load(app: Application) {
app.renderer.defineTheme("mydefault", DefaultTheme);
} So, I started by exactly this ^. When I reference my plugin, and then the theme, to typedoc CLI, it is used successfully but the rendering is totally broken: ericmorand@janet:~/Projects/twing$ typedoc src/lib.ts --out public --plugin typedoc-theme-2021 --theme mydefault
[info] Loaded plugin typedoc-theme-2021
[warning] TypeDoc has been loaded multiple times. This is commonly caused by plugins which have their own installation of TypeDoc. The loaded paths are:
/home/ericmorand/.nvm/versions/node/v16.20.2/lib/node_modules/typedoc
/home/ericmorand/Projects/typedoc-theme-2021/node_modules/typedoc
[info] Documentation generated at ./public I am definitely doing something wrong but since I'm just starting and following the documentation strictly, I don't know where to start to fix the issue. Any help would be appreciated. |
Thanks for being willing to help out!
This warning is the cause of the rendering issues. TypeDoc relies on an Personally, the way I usually work around this when developing plugins is to run TypeDoc from the plugin's installation. If you use |
Actually I found that installing typedoc and themes globally was also triggering the "loaded multiple times" issue because of this bug (or feature) of npm: The workaround is to use the |
Good idea, added! |
This is a follow up to the very nice implementation of the feature request Add JSON view for interfaces.
Would it be possible to have the generic parameters displayed in the JSON view? In its current state, it looks a bit strange to have some properties of an interface typed with a type that is not resolved to anything, like in the following example:
https://twing-api.nightlycommit.com/interfaces/TwingBaseNode.html
Here,
attributes
,children
andtype
have types that don't reference anything. Of course, they are defined later on in the page, but it still seems off to have types in the JSON view that don't reference anything.Something like that would be cool:
The text was updated successfully, but these errors were encountered: