- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 735
Show members of a type alias #2260
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
Comments
For now, I've gone back to typedoc 0.23.x as it's a little better for my case. I found that typedoc-plugin-expand-object-like-types DOES indeed cause members to be expanded. To fix the errors with the less capable resolver of 0.23.x I manually added all the I also have the following benefits from 0.23.x so I will pin my project for now, until I can get plugins to fix the problems of 0.24.x...
|
This sounds like the |
Thanks for the very useful project for test data! I experimentally upgraded it to use TypeDoc 0.24 again, and changed the configuration up to use TypeDoc's packages mode + TypeScript's project references (definitely not necessary for your smallish project, but it's intended for monorepos, and enables getting rid of the per-module comments to set the name and include the readme) This resulted in finding a couple bugs, released in v0.24.6. TS link resolution wasn't used within block tags, and the modules not expanding when active was confirmed and fixed. |
Thanks, @Gerrit0 I feel privileged to have your time and attention supporting me! I'd certainly be more comfortable with mainline I've completed this iteration of the documentation in anticipation of releasing the final version in the You've also taught me some important config changes which I should examine - new When I revisit documentation I'll be sure to share any bugs that appear if this is a useful reference repo for you, and I'll try to align with the build changes you've proposed at that time. |
I spent a few hours attempting to align the project with your suggestions with this PR, and then was stalled for several more hours with the problem that I can't stop This has followed from some change to the cascading structure of tsconfig imports. I believe I've followed all the steps you shared, but I may have missed one. This is not your problem of course, but I'm sharing as in practice it is the cascade of fragile config relationships and incompatibilities that consumes all the time when trying to adopt a tool like typedoc and it's good for you to be aware, maybe? Not sure if any choices within typedoc could make a difference. To ensure that all the targets of ProblemIf I try to run the qa task the unnecessary creation of files like Running ```git clean -fdx && npm install && npm run qa` fails at the linting phase. Checking status shows extra files were created which don't satisfy the linter (but should not have been created at all).
I am between a rock and a hard place here given every layer of tooling implicitly requires a different tsconfig structure and that Focusing in on one reference app 1) Remove this lineRemove below line from tsconfig.node.json causes a jsx error out of the blue
1) Error
2) Add lineAs an alternative I could try adding a noEmit to the tsconfig.node.json
2) ErrorThis results in the following failure instead that tells me I
SummaryMagic-config dead ends like this which consume hours are fairly typical of my experience working within the ecosystem. Not sure what any maintainers can do about it, honestly, but the result is people not progressing with the fundamentals (features, actual code) while they face these blockers each of which require interpreting and understanding every layer of the transpilation and bundling process which is by no means a black box. For this particular issue I've no idea what has changed to cause |
Final restructure of app build (to isolate them fully from the top level configs) in cefn/watchable@ef96cf1 seems to have suppressed the creation of vite.config build artefacts. Now I need to see whether anything else breaks if I follow that through for all Typescript apps. Update: this was apparently not true, maybe due to some kind of cached build artefacts. |
Actually after updating every app in line with this change, the artefact now seems to be coming from somewhere else, and is still coming. Running the following against https://github.com/cefn/watchable/tree/53db54b4cc15159844d9df26f2ee8394b9587e55
...I still have a failing lint task in the pipeline and lots of unnecessary vite.config files emitted...
Weirdly if I run the above failing task then change into one of the app directories and run the same operation from there (the git clean removes any build cache)
|
Finally, removing references to vite's The line (which references the tsconfig.node.json path) has been there since the vite apps were built, so I don't know why that interacts with the changes which were made to satisfy typedoc all of a sudden. This change solves the problem cefn/watchable@d255444 Now a failure from playwright upstream has broken the build instead, meaning it doesn't build on github any more so looking forward to another day dealing with that problem before I write any code :) |
Search Terms
Expand type members/properties
Inherited type members/properties
Feature request
Can we add a configuration or comment directive that would cause typedoc to show the members of a type alias? Typescript is able to detect they are there, but currently Typedoc doesn't show them.
Problem
I composed
Store
- the core type of my library through distinct interfaces and types which can be reasoned about, documented and tested independently. However, the result of using interface inheritance and type aliases to composeStore
is that Typedoc gives it no visible members at all in its documentation, making the API documentation from typedoc of very limited value for this case.You can see the generated documentation for
Store
at https://cefn.com/lauf/api/types/_lauf_store.Store.html . The documentation omits the crucialwatch
,read
andwrite
methods fromWatchableState
.Store Hierarchy
Watchable<T>
defines a subscription method (watch()
) for tracking aT
WatchableState<T>
extendsWatchable<T>
withread()
andwrite()
methods to set and get aT
Immutable<T>
is a recursive-appliedReadonly<T>
A
Store<T>
is composed as the type aliasWatchableState<Immutable<T>>
Existing Features
The Typescript compiler can resolve what members
Store
has, which is demonstrated during auto-completion...I don't think following the typedoc links to the separate interfaces
Watchable
,WatchableState
,Immutable
helps the average person work out what the methods ofStore<T>
are, once they have lost context and are looking at a different type.I can't identify any configuration that causes types to have the detail of their members exhaustively listed. There doesn't seem to be anything that can be added to a type's header comments to trigger this either.
I have tried to exhaustively understand all the options available but none seems to cover this case.
I tried to establish if typedoc-plugin-expand-object-like-types would show the members. However that plugin is pinned to an older typedoc version, and I have just finished refactoring all my documentation to align with the requirements of typedoc
0.24.x
. Rolling back to 0.23.x raises a lot of warnings of unresolved and broken links now. I force-installed the plugin against 0.24.x, but this didn't have the desired effect of adding visible members to theStore
definition..Thanks for considering my feature request.
The text was updated successfully, but these errors were encountered: