question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supporting Flow's type imports

See original GitHub issue

Has it been already discussed ?

export type Color = string;

should be imported as import type { Color } from './Types.js';

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
rndmerlecommented, Jun 21, 2017

It works nicely, hopefully. Gonna push the PR.

type imports

1reaction
rndmerlecommented, Aug 4, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found