Replies: 1 comment 7 replies
-
Hello @jtwaleson! This is an interesting feature, but I think it would make collaboration more difficult
If the Rust and TS codebases are in separate git repos, the relative paths will likely be different between devs working on these repos, which will mean the path won't make sense for some and if the TS bindings are checked into git that will cause unnecessary changes - this could potentially be solved by exporting the type's module path instead (
It could probably work by emitting But there's another way to achieve this: documentation comments If you document you rust types with doc comments ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have my frontend and backend in one repo, and would like to see the source of an auto-generated typescript definition.
Something like:
This way I can click in my IDE to go to the correct place, and also any AI coding agents can quickly jump to the correct file to see where this is leading into the backend.
I tried to get this to work in ts-rs but struggled as I'm still a bit new to Rust and it seems that source path information is not easily accessible in macros.
So for now, two questions:
Beta Was this translation helpful? Give feedback.
All reactions