-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Missing default when re-exporting with export =
#8840
Comments
export =
export =
@mhegazy this is breaking a few people using default exports with Typings (see typings/typings#525). |
If I remember correctly, this is currently because we treat |
Thanks @weswigham. In that case, I switched to the |
I highly recommend not mixing up |
@mhegazy That means Typings can not work and will never work. |
If you look at the message above, that's how it used to work - but it broke people who wanted to augment modules. |
@mhegazy , IMO, I agree that the interop between ES2015/commonjs is hairy. Until a standard spec is derived we (the consumer) should avoid doing interop and use the module as it intended to be. But currently it is a necessity as more and more people adapt to ES2015 thanks to Babel and TypeScript. I think we all appreciate the effort the team put in to make it a reality. As for the interop, it has to be complete. As now commonjs -> ES2015 works (except #7398), and ES2015 -> commonjs also possible: import alias = require("./export-default");
export = alias; the solution has to be complete and cannot leave out the |
TypeScript Version:
nightly (
1.9.0-dev.20160518-1.0
)Code
Expected behavior:
This project should compile and executing
main.ts
should output"bar"
.Actual behavior:
The following compilation error occurs:
Comment
This issue prevents typings from exposing default exports ( original
typings
issue).The syntax in
re-export.ts
is used as a workaround for TS preventing the augmentation of module-definitions re-exported withexport * from "export-default"
(see this issue and this comment).The text was updated successfully, but these errors were encountered: