-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
How to export a specific type and all its children #95
Comments
|
I am going to reopen this issue as a reminder to myself that a better solution needs to exist here. Brendan is completely right in the fact that the current APIs around dealing and exporting dependant types are very low-level and there is no reason that should remain the case. I think it has mostly ended up that way as we have added APIs into Specta as required for rspc and tauri-specta without really thinking super heavily about using Specta without a framework wrapping it. It's worth noting that the |
Yes I have noticed it. However, the way I want to use specta is that I want to write the export of different types to different files. If I understand correctly, specta right now works by appending each registered type to a typemap. That does not satisfy my use-case. |
Completely fair. We could potentially allow the user to define a function to decide the file to put the types into from the Out of curiosity are you organising your types by module or some internal concept? I will keep this all in mind for when I next have time to work on Specta. |
No, I just have them in one Schematic has the behavior of just exporting the given type and its children. Here is an export using schematic. The reason I am using specta and not schematic is because schematic is used for configuration and I just want to export the type signature. |
On a different note, does specta not export docs for each field? I have added doc comments for the field but specta does not export them. |
I don't think it does right now. Nothing would be preventing that from working if added to the macros, was just an oversight. |
The export function only exports the given type and not its children. How can I export a type and its children?
The text was updated successfully, but these errors were encountered: