Cannot export self module as default #38387
Labels
Bug
A bug in TypeScript
Fixed
A PR has been merged for this issue
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
TypeScript Version: 3.8.3
Search Terms:
module import export circular
Background
I use to write module like this:
Then we can import the module with both to ways:
That's work fine with JavaScript but not TypeScript.
Code
Expected behavior: works like JavaScript.
Actual behavior:
So I modify my code to:
This works fine with JavaScript too, but not TypeScript again.
Expected behavior: works like JavaScript.
Actual behavior:
I modify my code again to:
It finally works, both JavaScript and TypeScript.
The text was updated successfully, but these errors were encountered: