-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed as not planned
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
π Search Terms
esm module import export
π Version & Regression Information
This reproduces with version 5.6
β― Playground Link
π» Code
import type * from 'foo';
class Foo {
private test() {
let a: number;
a = this.compute();
}
compute(): number {
throw new Error("Method not implemented.");
}
crawl() {
throw new Error("Method not implemented.");
}
}π Actual behavior
There is a export {}; at the end of the JS file.
π Expected behavior
import type should have no side-effects on the generated JS.
Additional information about the issue
The issue here is that this forces the JS file to be ESM when it maybe is not. This makes it hard to convert from JS to TS where in JS I have more control over this.
mjbvz
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