Supporting Flow's type imports
See original GitHub issueHas it been already discussed ?
export type Color = string;
should be imported as
import type { Color } from './Types.js';
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Module Types
Importing and exporting types. It is often useful to share types in between modules (files). In Flow, you can export type aliases, interfaces,...
Read more >Documentation - TypeScript 3.8
import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there's no remnant of...
Read more >Can't import module types in Flow library definitions #2023
So just to clarify – Flow itself does allow importing types from different libraries, but flow-typed doesn't currently support it. @villesau ...
Read more >type-only imports — A new TypeScript feature that benefits ...
Here we're taking types we've defined in a types.ts file and then re-exporting them from lib-ambiguous-re-export.ts . This code won't pass a ...
Read more >Mix normal and Flow-'type' imports
Essentially, doing the shorthand can trick Babel into thinking someType is a binding, when it's not, and support for handling this case is ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It works nicely, hopefully. Gonna push the PR.
It should be in the 2.7.0 version released 2 days ago. However, it’s probably not yet propagated to the editor add-on you’re maybe using.