Skip to content

Additional export from statements from ES7 #6245

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

Closed
Strate opened this issue Dec 25, 2015 · 2 comments
Closed

Additional export from statements from ES7 #6245

Strate opened this issue Dec 25, 2015 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@Strate
Copy link

Strate commented Dec 25, 2015

There is already exists es7 proposal https://github.com/leebyron/ecmascript-more-export-from
and it accepted to stage-1.

It sould be nice to have same in typescript. Without it, it is annoying to write something like:

// module1.ts
module Module1 { // I should explicit wrap to module for export
    // ... module declaration
}
export default Module1

// module2.ts
module Module2 {
    // ... module declaration
}
export default Module2

// index.ts
export {default as Module1} from "./module1"
export {default as Module2} from "./module2"

// usage.ts
import * as Modules from "./index"

// can be used Modules.Module1.

This can be done better with proposal:

// module1.ts
// just a module declaration, without wrapping to explicit module

// module2.ts
// just a module declaration, without wrapping to explicit module

// index.ts
export * as Module1 from "./module1"
export * as Module2 from "./module2"

// usage.ts
import * as Modules from "./index"

// can be used Modules.Module1.
@plantain-00
Copy link
Contributor

+1

@DanielRosenwasser
Copy link
Member

Thanks for filing @Strate, but this is a duplicate of #4813.

@DanielRosenwasser DanielRosenwasser added the Duplicate An existing issue was already created label Dec 25, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants