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 #4

Merged
merged 3 commits into from
Jan 13, 2024

Conversation

siefkenj
Copy link
Owner

Fixes madonoharu#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

@siefkenj siefkenj merged commit 8d83bbb into siefkenj:next Jan 13, 2024
2 of 3 checks passed
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.

2 participants