Aleph-Alpha / ts-rs

Generate TypeScript bindings from Rust types
MIT License
1.08k stars 107 forks source link

Add leading colon to `ts_rs` path in macro expansion #267

Closed escritorio-gustavo closed 6 months ago

escritorio-gustavo commented 6 months ago

Goal

If, for some (very bespoke and cursed) reason, a user creates a mod called ts_rs and has it in scope, it becomes impossible to derive TS, all the ts_rs::<something> paths will look inside that mod instead of our library. This PR aims to make such (cursed) code compile

Changes

All paths to ts_rs generated by ts_rs_macros now have two leading colons, e.g.: ::ts_rs::TS

Checklist