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

Copy rustdoc comments over to TS output #32

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sisou
Copy link

@sisou sisou commented Aug 14, 2023

Fixes #14.

This PR adds the ability for tsify to detect and transfer rustdoc (/// ...) comments into the TS output and attach them to the type definitions, so users can see them in their IDE when they hover over variables in their Typescript code.

Inspired by the same functionality in wasm-bindgen.

About the Tests

For this PR, I have added comments into all tests. As you can see, I took great care to only add comments, not change tsify's output formatting for the types itself.
If you don't like comments in all your tests, I can create a separate test file just for comments instead and put most of them in there. Let me know 😉


  • Formatted everything with cargo fmt
  • All test run and pass

@TroyKomodo
Copy link

@madonoharu bump on this pr

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

Successfully merging this pull request may close these issues.

Rustdoc comments are not included in TS output
2 participants