-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
Bug Report
When using export * from './empty'
where empty
is an empty module I get an error that the file is not a module.
// index.ts
export * from './empty';
and two empty files empty.d.ts
and empty.js
next to it.
🔎 Search Terms
- "TS2306"
export * with empty module
- "is not a module"
🕗 Version & Regression Information
Happens in 4.4.4, and on all workbench versions.
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about "'export *' with empty modules".
⏯ Playground Link
Workbench link with relevant code
💻 Code
// @filename: index.ts
export * from './empty'
// @filename: empty.d.ts
// Comment.
// @filename: empty.js
// Comment.
🙁 Actual behavior
Error:
error TS2306: File 'empty.d.ts' is not a module
I can import empty modules, so why can't I export *
from empty files?
🙂 Expected behavior
The export *
should just be ignored, since the empty module doesn't export anything.
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug