-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
using "export interface" produces import/named error #726
Comments
Invalid issue. |
May I ask why it is invalid? |
I am running into this now, and I believe this bug should be re-opened. There is no test covering this case, so at the very least there should probably be a test on this. Flow gives exporting and importing interfaces as a canonical example in their docs, so I believe this should work. Thanks for the work on this plugin, it's been great at catching issues! |
@gajus can you elaborate on why you thought the issue was invalid? |
Re-opened the issue as I cannot recall the original reason/ problem for tagging it as invalid. |
I think I simply was unable to find documentation at the time proving that this syntax is valid. Documentation for |
|
It's flow syntax: https://flow.org/en/docs/types/modules/ On my side, if I remember correctly, I started using this plugin because I read somewhere it was supporting flow type imports, but I bumped into this error. Hope this helps :) |
(Can't remember where I read about flow type support though...) |
It definitely supports flow; I'm just not familiar with it is all :-) |
I believe the issue lies here. |
FWIW, in general we've trying to allow/support Flow syntax but definitely rely on community support to keep that up to date. There is only as much testing/support for it as community members have provided. @spencerhakim, you're saying TS's |
BTW it is not clear to me whether the original issue with Flow syntax was fixed or not, by #881. Same thing goes for TypeScript as Flow: if it's easy and the community is up for it, will happily support more syntax. |
If no one else picks this up, I can put some time into a PR within the next week. |
FYI, the above PR passes all tests, but is marked as failing because a |
This should be fixed by #958. |
I think there was perhaps a regression with this? (edit: the syntax is subtly different, but still valid.) Defined in react-select: export interface Option<TValue = OptionValues> { // ... } Imported: import Select, { Option } from 'react-select' Error:
Relevant packages:
|
New flow syntax often results in rules not working with it; can you open a new issue for that? |
Declaration code:
Import code:
Error:
The text was updated successfully, but these errors were encountered: