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
Import type, missing "type" keyword #74
Comments
@sitnarf |
I am experiencing this also (using version 1.10.0). Here is a minimal reproducible example:
Run: $ npx flowgen ./b.d.ts Actual Result:
Expected result:
|
I don't think it's possible to know what is imported |
I have a similar problem - but with exports ... meaning all the types are in 1 file // .d.ts
type ToString = {toString: () => string}
export {ToString} actual result // .js.flow
declare type ToString = {
toString: () => string,
...
};
declare export {ToString} expected result // .js.flow
declare type ToString = {
toString: () => string,
...
};
declare export type {ToString} // or something that indicates that a type is exported, otherwise flow complains Is this solvable? Or is there some kind of workaround at least? |
Sorry, I didn't get the notification earlier. I believe, we used .ts files for generating .js.flow. |
I am also having the same issue. When I |
related to this, when having code like: it is also converted to: tried to make a fix for it here zxbodya@823d624 (based on #115 but should be easy to backport) |
I see the PR has been merged but I am still having this issue. Which version is this available in? I am using |
merged PR fixes only particular case of the issue - when there was |
Hi,
I have type import in my ts file:
import { HttpRequest } from "./httpRequests"
but the generated flow declaration states:
import { HttpRequest } from './httpRequests';
instead ofimport type { HttpRequest } from './httpRequests';
Shouldn't be this automatically transpiled? Tried last flowgen from repo. Thanks.
The text was updated successfully, but these errors were encountered: