-
Notifications
You must be signed in to change notification settings - Fork 28
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
Duplicated variables when doing --inline-imports
#14
Comments
The above example could likely be handled by just naming the manufacturer type differently between the files. Here's a simpler and more broken example that will result in the same error, even for a single
|
Any updates on this? |
FWIW my workaround ended up being something like this:
Essentially doing createCheckers once with everything, rather than making separate ones, which avoided multiple repeated definitions of the same thing. This doesn't fully solve the problem but it was sufficient for my use case |
@fastfrwrd, since you added the |
TS source:
Car-type.ts
Bike-type.ts
Vehicle-type.ts
Above scenario is sketched out to brings out the idea of the possible problem. Building interface type from
Vehicle-type.ts
with--inline-imports
will lead to having duplicated variable named Manufacturer being generated in the same type file because import alias was not respected.Suggestion: Use the import alias a prefix to generated variable name.
The text was updated successfully, but these errors were encountered: