Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Why actually export something to satisfy the parsing goal? #3

Closed
jmm opened this issue Jun 15, 2016 · 4 comments
Closed

Why actually export something to satisfy the parsing goal? #3

jmm opened this issue Jun 15, 2016 · 4 comments
Labels

Comments

@jmm
Copy link
Contributor

jmm commented Jun 15, 2016

Can you comment on why you decided to advise actually exporting something (export default null) as opposed to a no-op that satisfies the parsing goal (export {})? (I'm not entirely sure why, but I believe that's valid.) Do you think it more clearly indicates intent?

Thanks!

@jdalton
Copy link
Member

jdalton commented Jun 15, 2016

Can you comment on why you decided to advise actually exporting something (export default null) as opposed to a no-op that satisfies the parsing goal (export {})?

I think export default null is a bit more descriptive but they both accomplish the same goal.
I could add a shout out to both.

@jdalton jdalton closed this as completed Jun 15, 2016
@jmm
Copy link
Contributor Author

jmm commented Jun 15, 2016

Thanks for the feedback. I think I personally would be a bit more inclined to do export {} (or something like export { /* noop */ } if I wanted to be more explicit), but since there's no hard requirement in terms of that I'll be keeping an eye out for what conventions (like your suggestion) emerge or get traction if this proposal moves forward. I don't know off the top of my head if there'd ever be any other reason to do export default null (though I'd expect it to be rare).

@jdalton
Copy link
Member

jdalton commented Jun 15, 2016

I think I personally would be a bit more inclined to do export {}

I think you're right. I'll make the correction.

@jmm
Copy link
Contributor Author

jmm commented Jun 16, 2016

Ok cool. That makes sense to me right now, but if some other convention turns out to be better I'd be all for it.

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

No branches or pull requests

2 participants