typeshare
typeshare copied to clipboard
Allow exported type file to have code that won't be overwritten
This is a great tool but I put some of the types that aren't separated into a helper file.
And then I manually import them into the file.
I also import files that are generated from another package.
// also generated by typeshare
import { AttachDirection, RawElement, RawElementId, RawTimelineId } from "./opset_types";
// helper file
import { JsonFraction } from "./rust_type_helpers";
// ==================================== GENERATED ====================================
... generated code here ...
It would be great if typeshare
kept the code above
==================================== GENERATED ====================================
And only replaced the code below it.
Hello, and thank you for your suggestion. This isn't a high priority because the combination of generated and manually created code can be handled within a script/toolchain. That said, we'd welcome community contribution on this matter.