Replies: 1 comment
-
We have the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some background for example use scenario: I'm currently using https://github.com/fumeapp/modeltyper to generate types for my models and I would love to use those types with types generated by this package.
Currently I have a custom transformer and a writer to help me transform my broadcasted events into typescript types (the transformer takes all broadcast events and converts all properties that are models into their short name variants, the writer checks the content for models that need to be imported.)
This results in the following output for my two event classes that have a single model property:
However, the way I have currently achieved this is terribly clumsy. There are no properties on the transformed type that would allow me to iterate over its properties so I have to try checking the imports from the formatted typescript string which is far from ideal.
Possible Fixes:
Preserve an iterable list of nested types in
TransformedType
(to allow for easier access by the writer to underlying types)and/or
Allow for custom implementations for the replace missing symbols step of the application. This could be used to ignore replacement of missing symbols into
any
when there's a type that can be imported by the writer.Beta Was this translation helpful? Give feedback.
All reactions