flow icon indicating copy to clipboard operation
flow copied to clipboard

Flow isn't auto discovering `.flow` declaration files for top-level re-exports

Open thejewdude opened this issue 4 years ago • 1 comments

Flow version: 0.173.0

Expected behavior

When I import any object from flux, the .flow declaration files should be auto discovered and flow should provide typings and completions.

// @flow
import { ReduceStore } from "flux/utils";

Actual behavior

Flow doesn't discover the declation files and all exports are typed as any(implicit). I have to drill down node_modules and import from the actual file like so:

// @flow
import ReduceStore from "flux/lib/FluxReduceStore"
  • Link to Try-Flow or Github repo: https://github.com/thejewdude/playground-flux-flow

thejewdude avatar Mar 06 '22 21:03 thejewdude

Expected, since import { ReduceStore } from "flux/utils"; doesn't have @flow so it's untyped.

SamChou19815 avatar Jul 13 '23 23:07 SamChou19815