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 skip_typescript attribute to prevent .d.ts emit #2016

Merged
merged 2 commits into from
Mar 3, 2020

Conversation

joeywatts
Copy link
Contributor

@joeywatts joeywatts commented Feb 28, 2020

Fixes #1691 by adding support for a skip_typescript attribute which disables generation of type definitions for a particular Rust export.

@joeywatts joeywatts changed the title Add typescript attribute to prevent .d.ts emit (WIP) Add typescript attribute to prevent .d.ts emit Feb 28, 2020
@joeywatts joeywatts force-pushed the omit-typescript-definitions branch 2 times, most recently from 96b287d to 838a6c9 Compare February 28, 2020 15:33
@joeywatts joeywatts changed the title (WIP) Add typescript attribute to prevent .d.ts emit Add typescript attribute to prevent .d.ts emit Feb 28, 2020
@alexcrichton
Copy link
Contributor

Thanks for this! I think though perhaps instead of typescript = false we could do something like skip_typescript? I'm not sure how many other things we'll want on the other side of the = for now perhaps?

It may also make sense to hold off on this for a bit while #2012 is sorted out, since that's a pretty unwieldy PR and may be hard to rebase over this.

@joeywatts
Copy link
Contributor Author

skip_typescript seems good to me. If you prefer to wait on that PR, I don't mind rebasing/reworking this once that's in.

@joeywatts joeywatts force-pushed the omit-typescript-definitions branch from 838a6c9 to 0363a7c Compare March 2, 2020 01:41
@joeywatts joeywatts changed the title Add typescript attribute to prevent .d.ts emit Add skip_typescript attribute to prevent .d.ts emit Mar 2, 2020
@joeywatts joeywatts force-pushed the omit-typescript-definitions branch 2 times, most recently from e4cbdb7 to 88394c7 Compare March 3, 2020 01:43
@joeywatts joeywatts force-pushed the omit-typescript-definitions branch from 88394c7 to 17d7873 Compare March 3, 2020 01:58
@alexcrichton alexcrichton merged commit 7ffb5ed into rustwasm:master Mar 3, 2020
@alexcrichton
Copy link
Contributor

Thanks!

@joeywatts joeywatts deleted the omit-typescript-definitions branch March 4, 2020 00:50
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.

Add an attribute to prevent emitting typescript definitions for a specific #[wasm_bindgen]'d item
2 participants