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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate documentation for types generated with t.TypeOf #692

Open
ships opened this issue Mar 23, 2023 · 1 comment
Open

How to generate documentation for types generated with t.TypeOf #692

ships opened this issue Mar 23, 2023 · 1 comment

Comments

@ships
Copy link

ships commented Mar 23, 2023

馃摉 Documentation

I would love some hints included in this repository as to how the generated types can be conveniently documented. This could be links to examples of projects using generators, references to generator tools that work well with io-ts, description of how TypeOf works so that the types are knowable to tsc...

I saw #201 give an example of how VSCode can infer comments for individual fields. However, when I simply run typedoc against my project, it cleanly copies the = t.TypeOf<IdAndOptionalString> (name is just an example) statement rather than showing me the type as tsc does when a type error is detected (like { id: string } & { name?: string }.

@ships
Copy link
Author

ships commented Mar 23, 2023

I have played with your docs-ts library (see my WIP here) as well as typedoc, and they both show the same behavior. And yet tsc does still display the correct and complete exact union & intersection type. Am I missing a step?

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

1 participant