You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I'm curious if it's possible to create runtype types from existing TypeScript types?
Specifically, I am hoping to avoid:
Having to comb the codebase and redefine types as runtypes manually
Having to cast these new runtypes into TypeScript types using Static<T>
Perhaps this simply isn't possible due to the TypeScript architecture, but I'd be curious to know more if you have a moment to share. From what I can gather, there isn't a single "runtime types library" out there that doesn't rely either on:
Defining types using a library provided API instead of vanilla TypeScript
Exporting types to JSON Schema or some interchange format as a discrete build step
Lastly, I just wanted to thank you for your work on this library. It has a wonderfully intuitive API and it's easy to see the amount of care that went into documentation & general developer ergonomics ✨
The text was updated successfully, but these errors were encountered:
I'll add and say that one the disadvantages that I see currently in the fact that we can't create a runtype from a given TS type or interface, is the fact that you can't use the "find usages" action in your IDE to review all the places that you are using a specific property of that runtype, while that can easily be done if you apply it on a well defined TS type/interface.
Another thing I came across today is a usecase where you want to rename an existing property of a runtype in a project. Because the IDE doesn't have the above connection between a runtype and its properties, you can't rename a property in a single automatic action, you have to do it manually which is annoying and error prune.
WDYT?
Hi there, I'm curious if it's possible to create runtype types from existing TypeScript types?
Specifically, I am hoping to avoid:
Static<T>
Perhaps this simply isn't possible due to the TypeScript architecture, but I'd be curious to know more if you have a moment to share. From what I can gather, there isn't a single "runtime types library" out there that doesn't rely either on:
Lastly, I just wanted to thank you for your work on this library. It has a wonderfully intuitive API and it's easy to see the amount of care that went into documentation & general developer ergonomics ✨
The text was updated successfully, but these errors were encountered: