-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
area: typescriptgood first issuei: needs triageoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
import { A } from "./a.js";
export { type A };Configuration file name
No response
Configuration
No response
Current and expected behavior
Current:
import { A } from "./a.js";
export {};Expected:
export {};Environment
Repl as of 2023-03-13
Possible solution
Mark <ident> as a type, just like you would with const a: <ident> = 1;.
Additional context
TS has the correct behaviour: https://www.typescriptlang.org/play?isolatedModules=true#code/PTAECMDoBcGcCgCWBbADgewE7VAb1AIKgC+oAZpusqAESTACGkAVrDQNzwCmAHhtnlDQAnqi6ES7IA
SWC has the same bug: swc-project/swc#7076
Metadata
Metadata
Assignees
Labels
area: typescriptgood first issuei: needs triageoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue