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
I'm generating types based on the api's schema which works. However the results contains a lot of export which forces me to explicitly import the generated types.
Since it's a Nuxt project (which comes with a nice auto-import feature) I'd like to have the generated types available without explicitly importing them. I've found an old issue that which relates to this topic though was (unfortunately) solved differently: #202
@bcherny it would be great to have an option to disable adding export
The text was updated successfully, but these errors were encountered:
Can you expand on your use case a little more? It's generally an anti-pattern to use globals (values or types), and better to import types explicitly when you need them. Auto-import in VSCode also works fine with exported types.
I have two JSON Schema files, and they are independent but refer a shared common JSON schema.
When I use the "json-schema-to-typescript" to generate two ts files and I export a.ts, b.ts in index.ts, like:
export*from'./types/a';export*from'./types/b';
There are a TS errors show to tell me the common type is duplicated.
So I want to have the disable adding export feature.
I would love to have this as well. I'm using this library to generate types for a larger codegen purpose, where the types will be exposed as a generic parameter to a class instance that is exported. I don't need (or want) these types exported because they clutter up autocomplete in the IDE. Right now I'm just using regex to remove the export, but that doesn't feel like the best solution.
I'm generating types based on the api's schema which works. However the results contains a lot of
export
which forces me to explicitly import the generated types.Since it's a Nuxt project (which comes with a nice auto-import feature) I'd like to have the generated types available without explicitly importing them. I've found an old issue that which relates to this topic though was (unfortunately) solved differently: #202
@bcherny it would be great to have an option to disable adding
export
The text was updated successfully, but these errors were encountered: