Skip to content

Conversation

@GeoffreyBooth
Copy link
Collaborator

Closes #4387.

Apparently code like this is not only allowed in ES2015, it’s common:

import { default } from 'lib';

Although import default from 'lib'; is not allowed in ES.

This PR allows destructured import (and export-import) of module members named default.

@lydell lydell merged commit 3ea0481 into jashkenas:master Dec 5, 2016
@lydell lydell deleted the import-member-named-default branch December 5, 2016 06:15
@lydell
Copy link
Collaborator

lydell commented Dec 5, 2016

I never stop learning new stuff about import/export. Good work!

@GeoffreyBooth
Copy link
Collaborator Author

Too bad we didn’t slip this in before 1.12.0. Well, I guess it won’t be long before 1.12.1 . . .

@lydell
Copy link
Collaborator

lydell commented Dec 5, 2016

We could do 1.12.1 as soon as possible, if you feel like it.

@GeoffreyBooth
Copy link
Collaborator Author

GeoffreyBooth commented Dec 5, 2016

Let’s see what else people find in the next few days?

There was a workaround for #4387, it occurs to me now. One could always have done:

import * as lib from 'lib'
def = lib.default

So there shouldn’t be too much urgency in getting this fix released.

GeoffreyBooth added a commit to GeoffreyBooth/coffeescript that referenced this pull request Dec 7, 2016
@GeoffreyBooth GeoffreyBooth mentioned this pull request Dec 7, 2016
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.

2 participants