-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(Partially) generate Rust type & function declarations from TypeScript type definiton file or JSDoc #18
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
Comments
Nah definitely! I could totally see something like wasm_bindgen_typescript!("foo.d.ts"); being used |
I thought of it as a separate nodejs tool since the Typescript parser is a node module. I could attempt writing a provisional script, but I know nothing about macros... yet. |
TypeScript also has modules and interfaces, which could be directly translated to Rust modules and traits with ease, so support for these would be great. |
Yeah I'm not sure what the best way to do this would be. I'd naively prefer to start off with a syn-based parser (just in the procedural macro itself) rather than picking up a dependendy through node, but I'm not sure how easily that'll work. Alternatively there could be a JS tool which takes a |
This is similar to https://github.com/alexcrichton/wasm-bindgen/issues/42 as well |
Experimental support for this is now in the repository and future work is tracked with a label, so I'm gonna close this for now |
Of course this does not work for some types..
This might belong in another repo.
The text was updated successfully, but these errors were encountered: