-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Export Type { Interface } creates empty export #47470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is working as intended. As soon as you use |
w.r.t. the explanation given in #41513 - For what it's worth, per ECMAScript, whether a |
So, after reading the #41513, it seems that the intention is to represent that the given file is a module, is this not the .mjs file extention for this purpouse. The .mjs extension does have the unfortunate side effect of some servers disagreeing with MIME types but sounds like this is generally being fixed, so would it be possible to add a compiler switch to change from generating |
Technically a duplicate but we've recently been discussing removing the |
Bug Report
🔎 Search Terms
export type
export type interface
export type creates empty export
🕗 Version & Regression Information
From version 4.0 till nightly
The issue that I'm discovering is that my JS output is being covered in files containting export {} where I've defined a interface that gets exported. It would be preferable if these files could not be created.
⏯ Playground Link
Playground link with relevant code
💻 Code
or
🙁 Actual behavior
Generates a JS file with an empty export, IE
🙂 Expected behavior
I would expect there to be no JS file generated as types are only used at compile time.
There really shouldn't be any imports for the interfaces left in the JS so having these loose exports tidied up shouldn't cause any unexpected side effects.
The text was updated successfully, but these errors were encountered: