Closed
Description
Given a directory structure like the one below:
.
├── asconfig.json
├── assembly
│ ├── bar
│ ├── common.ts
│ ├── foo
│ ├── index.ts
│ ├── reexport.ts
│ └── tsconfig.json
├── index.js
├── package-lock.json
├── package.json
└── tests
└── index.js
5 directories, 15 files
where:
foo
and bar
are directories that contain two files each:
//index.ts
export * from '<foo|bar>';
// Foo | Bar
export class <Foo | Bar> {
}
common.ts
aggregates the imports from Foo and Bar:
import * as Foo from './foo';
import * as Bar from './bar';
export {Foo, Bar};
and reexport
just reexports everything in common
:
export * from './common';
When trying to import *
from reexport
, the following compilation error is raised:
ERROR TS2305: Module 'assembly/reexport' has no exported member 'Foo'.
import {Foo, Bar} from './reexport';
~~~
in assembly/index.ts(4,9)
If the named export in common.ts
is replaced by a star export, things work:
export * from './bar';
export * from './foo'
Is this expected?