Input
import { X } from "abc";
// assume Y is a type only namespace
import Z = X.Y.Z;
function a(t: Z.T) {
console.log(t);
}
Output
import { X } from "abc";
var Z = X.Y.Z;
function a(t) {
console.log(t);
}
Expected
The Z is a typing, it should be removed.
function a(t) {
console.log(t);
}
The bable also have a issue babel/babel#15942, and also have a pr to resolve it babel/babel#17025.
related rolldown/rolldown#3287