Closed
Description
TypeScript Version:
nightly (1.9.0-dev.20160518-1.0
)
Code
// export-default.ts
export let foo = "bar";
export default foo;
// re-export.ts
import alias = require("./export-default");
export = alias;
// main.ts
import foo from "./re-export";
console.log(foo);
Expected behavior:
This project should compile and executing main.ts
should output "bar"
.
Actual behavior:
The following compilation error occurs:
main.ts(1,8): error TS1192: Module '"D:/projects/expor-default/re-export"' has no default export.
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 with export * from "export-default"
(see this issue and this comment).