-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
ctix fails when source file contains two exports to the same wildcard module declaration #62
Comments
…dule declaration, fixes imjuni#62
.ts
or .tsx
…dule declaration, fixes imjuni#62
…dule declaration, fixes imjuni#62
…dule declaration, fixes imjuni#62
…dule declaration, fixes imjuni#62
…dule declaration, fixes imjuni#62
@insidewhy Hi, Thank you for your contribution! I've improved your contribution a little bit. I think use compiler api that more accuracy for each situation. In this case, TypeScript Compiler API return eg. Friend > *.ttf So I module declaration node change that return export declaration key. It make information like that, {
identifier: 'Friend',
isIsolatedModules: false,
moduleDeclaration: "'*.ttf'",
}, This improvement can remove the need to change the duplicate detection code. If you agree with this change, I will release the next version in this state. |
I wanted to do that also, couldn't find a way to do it without changing a lot of other code. From getExported to getExport... |
@insidewhy Thank you for your kindness. I completly agree changing only on validation logic. But I think that exportInfo result less about for validation. But I think the 'exportInfo' function doesn't return information to do the right validation. Thank you for your feedback! I will release this version soon! |
Thanks for releasing the fix so quickly. |
Take this code which is typical for a project built with
webpack
:and where
DeclareTtfModule.d.ts
looks like:Trying to compile a project like this exits with a non-zero status code and with the same error reported identically four times against the final line:
Changing the final line so it only exports a single symbol works fine:
Fixed this issue in #64
The text was updated successfully, but these errors were encountered: