-
Notifications
You must be signed in to change notification settings - Fork 6
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
Exporting static types even when "exportStaticType" is false #313
Comments
Runtypes The fact that the static types are being generated, even when configured not to do so, looks like a bug. |
OK, makes sense, I didn't realize that. In most cases this isn't an issue, the only very minor thing is that when editing other files VS Code will populate auto-complete suggestions based on exports of files in the same project, so it creates a bit more noise in that situation.
Got it, happy to help come up with a solution if I can. |
Make sure to pass reference to settings during recursion. #313
Problems with excluding static type exports fixed in |
This doesn't happen in all cases, but it seems to be the case with a tagged union. I have a one-click repro for you to check out here: https://stackblitz.com/edit/node-5bqrlm?file=src/main.ts
The source types in that example looks like this:
Click to expand
You'll see the generated output is at "src/generated/runtypes.ts" which was generated by running
ts-node src/main.ts
and it looks like this:Click to expand
Notice in main.ts I only asked for the type
Three
(which is the only exported member intypes.ts
) and I also specifiedexportStaticType: false
, yet I got 6 exports in the generated output, 3 of which are types.Any idea why this would be? If you can confirm this is a bug and if you could point me in the right direction I might be able to get a PR together.
Thanks!
The text was updated successfully, but these errors were encountered: