-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improve TS types #53
Comments
Thanks for finding |
It would be great to be able to learn more about the library right from VS Code by using the types, function comments and type files.
Function comments:
It looks like the function comments can be shared between Rust and TS right away, like it is done for
debugRenderGraph
:So one step would be to write more detailed function comments that cover the cases in https://github.com/dabreegster/route_snapper/blob/main/user_guide.md#wasm-api. I don't know if new lines will be accepted there, but that would be helpful (like a full JS Doc description block).
Input/output types:
The other part is having detailed input / output types. Right now a lot of them are just
string
orany
. One has to explore the shape of the files even though they are pretty defined by the library:Example:
I looked into this a bit (this article sounded good) and it sounded like one need an extra crate like https://lib.rs/crates/tsify to create those better types. Some will auto generate but one can customize this as well.
The text was updated successfully, but these errors were encountered: