We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
file1.ts
export function A() {} export function B() {}
Currently, if I want to export file1.ts as a sub module, I have to do: file2.ts
import * as subModule from "./file1.ts"; export var subModule = subModule; // or, export { subModule }
Is there an easier way such as:
export { * from subModule } from "./file1.ts"
Would it be ES6/ES7 compatible I didn't see any sample regarding this usage.
One question need to solve is how to handle any default export in the sub module.
default export
The text was updated successfully, but these errors were encountered:
Recommended
export * from "./file1.ts"
or an even older syntax (pre es6):
export import subModule = require('./file1.ts');
Note : They are not exactly equivalent 🌹
Sorry, something went wrong.
there is an ES7 proposal for this: https://github.com/leebyron/ecmascript-more-export-from#proposed-additions
Once this reaches Stage 3, TypeScript will need to support it.
i have filed #4813 to track this work.
No branches or pull requests
file1.ts
Currently, if I want to export
file1.ts
as a sub module, I have to do:file2.ts
Is there an easier way such as:
Would it be ES6/ES7 compatible I didn't see any sample regarding this usage.
One question need to solve is how to handle any
default export
in the sub module.The text was updated successfully, but these errors were encountered: