Skip to content
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

Implement export as namespace from #34903

Merged
merged 33 commits into from
Dec 21, 2019

Conversation

Kingwl
Copy link
Contributor

@Kingwl Kingwl commented Nov 4, 2019

Fixes (a part of) #4813

@Kingwl Kingwl changed the title init export start as decl [WIP] init export star as decl Nov 4, 2019
@Kingwl Kingwl changed the title [WIP] init export star as decl init export star as decl Nov 7, 2019
@Kingwl Kingwl changed the title init export star as decl Implement export as namespace from Nov 7, 2019
@Kingwl Kingwl marked this pull request as ready for review November 7, 2019 06:54
@ExE-Boss
Copy link
Contributor

ExE-Boss commented Nov 8, 2019

This only addresses half of #4813. The other half being export default from, which is currently at stage 1. (unless it got moved to a separate issue)

@Kingwl
Copy link
Contributor Author

Kingwl commented Dec 4, 2019

up🙆🏻‍♂️

@Kingwl
Copy link
Contributor Author

Kingwl commented Dec 9, 2019

Could we get this down in 3.8?🤔

@weswigham
Copy link
Member

@Kingwl can ya sync it with master?

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@DanielRosenwasser
Copy link
Member

I merged from master to fix conflicts, and I switched some of your tests to target multiple module outputs to avoid duplication (side note: I ran into #35809 while doing this which was annoying).

One thing I noticed was that you need a transform for es2015.

@weswigham
Copy link
Member

@typescript-bot pack this again now that it's up to date

export var a = 1;
export var b = 2;
//// [1.js]
export * as ns from './0';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be transformed into something like

import * as _ns from './0';
export { _ns as ns };

@DanielRosenwasser
Copy link
Member

I implemented export * as ns in ES2015, and renamed the transform and file appropriately. I think we should be good to go! 🚀

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 20, 2019

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at ed4f9b5. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/58409/artifacts?artifactName=tgz&fileId=C6440FA6CB5A138B28E2E5FE06AB428E11B9ED8E53FA33F05A6591C86C5DED9202&fileName=/typescript-3.8.0-insiders.20191220.tgz"
    }
}

and then running npm install.

@DanielRosenwasser DanielRosenwasser changed the title Implement export as namespace from Implement export as namespace from Dec 21, 2019
@DanielRosenwasser DanielRosenwasser merged commit 4c7844b into microsoft:master Dec 21, 2019
@DanielRosenwasser
Copy link
Member

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants