import-js/eslint-plugin-import

Re-export of a opaque flow type fails

Open

#1,348 opened on Apr 30, 2019

 (3 comments) (0 reactions) (0 assignees)JavaScript (1,549 forks)batch import
bugflowhelp wanted

Repository metrics

Stars
 (5,940 stars)
PR merge metrics
 (Avg merge 138d 22h) (3 merged PRs in 30d)

Description

With the following setup, there is an error in file-b:

file-a.js export opaque type Foo: string = string;

file-b.js export type { Foo } from './file-a';

However if the code in file-b.js is written differently (see below), it works fine.

file-b.js import type { Foo } from './file-a'; export type { Foo };

Hence I think this is a bug.

Contributor guide