-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
revisit --noUnusedLocals with "export types can't be named" #13694
Comments
Should not this be covered by #9944? |
If we are going to resolve #9944 by auto-import and eliminating the need for this extra import, then yes. It will be covered. On the other hand, I think the above code discover a bug. As I think of it, It is currently compiles fine. |
Suppressing |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
TypeScript Version:
2.1.5 and nightly (2.2.0-dev.20170125)
Code
I would like to enable
--noUnusedLocals
but the "export types can't be named" issue keep preventing me from doing so.Above is a simple scenario that involved a higher order function
createActionCreator()
.The logic is pretty simple and they function it returns is not hard to understand either.
If I turn on
--noUnusedLocals
, theconsume.ts
will fail becauseFluxStandardAction
is not explicitly used.But if I explicitly define the type of
const authenticate
, it is very redundant.On one hand, the author of
createActionCreator()
may create a type for the return value to fix this:However, not all package authors would do that, leaving the consumer with very verbose code with not much value gain, IMO.
As an alternative, maybe we can have an inline comment to disable checks for that particular import?
The text was updated successfully, but these errors were encountered: