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

Add doc comments export for typescript #1302

Merged
merged 1 commit into from
Feb 28, 2019
Merged

Add doc comments export for typescript #1302

merged 1 commit into from
Feb 28, 2019

Conversation

tyleranton
Copy link
Contributor

@tyleranton tyleranton commented Feb 27, 2019

This PR adds exporting Rust doc comments to TypeScript defs.

This is just pushing the comment string to the typescript variable on Context right after pushing it to globals for JS.

I'm not sure if there are any significant differences between JS Doc and TypeScript docs, so I didn't add in any additional formatting. I'd be happy to try and add that if there are any.

This is my first code contribution, so please let me know if there are additional things needed for this PR.

Thanks!

Fixes #1276

@alexcrichton
Copy link
Contributor

Heh that looks like it wasn't so hard after all!

Unfortunately we don't have a ton of tests for the TypeScript output right, now, but I'm curious if you've had a chance to test this out locally to make sure comments go to the right location?

@tyleranton
Copy link
Contributor Author

Yep I did! They go in the .js and .d.ts files respectively (above their functions).

@alexcrichton
Copy link
Contributor

Nice! Sounds good to me then

@alexcrichton alexcrichton merged commit da168dc into rustwasm:master Feb 28, 2019
@tyleranton tyleranton deleted the export-comments-ts branch February 28, 2019 20:09
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