Jesse, you can do:
`export default class Foo extends Backbone {}`
Ok, thanks. The empty block is required? The part after `extends` is just an
expression that evaluates to a function, right? So I could do this right
(where Backbone.Model.extend() returns a function)?:
export default class
I understand. My question is if I'm not putting anything in the block, I
still have to include the empty block?
Thanks,
Jesse
- Original Message -
From: caridy car...@gmail.com
To: Jesse McCarthy es-discuss-2015...@jessemccarthy.net
Cc: es-discuss@mozilla.org
Sent: Wednesday,
On Wed Feb 18 2015 at 4:40:34 PM Jesse McCarthy
es-discuss-2015...@jessemccarthy.net wrote:
Jesse, you can do:
`export default class Foo extends Backbone {}`
Ok, thanks. The empty block is required?
Yes, just like:
function Foo() {}
Where the braces are the syntactic boundary around
Yes, that syntax is incorrect and confusing.
There was an overside from our end to provide a way to re-export only the
default export from another module, and this is something we plan to revisit
for ES7/2016. Probably something like this:
`export default from “foo”;`
this is just sugar
1. Where is the function `run`?
The function `run` is pretty classic variation on the code you would see in
`Q` or `bluebird`.
function run(gen) {
return function (/* args */) {
var args = Array.prototype.slice.call(arguments);
var iter = gen.apply(args);
(function step(arr) {
- 1. Where is the function `run`?
The function `run` is pretty classic variation on the code you would see in
`Q` or `bluebird`.
function run(gen) {
return function (/* args */) {
var args = Array.prototype.slice.call(arguments);
var iter = gen.apply(args);
(function step(arr) {
I guess the take away here is that the default export is NOT a shared
binding, correct?
- Matthew Robb
On Tue, Feb 17, 2015 at 5:38 PM, caridy car...@gmail.com wrote:
Jesse, you can do:
`export default class Foo extends Backbone {}`
in case you want to reference to the exported class in
I was prompted to bring this issue to es-discuss.
https://github.com/babel/babel/issues/826
https://github.com/babel/babel/issues/826
It is my confusion about why this syntax does not work:
export foo from ‘./foo'
More details are in the issue but the gist is that sometimes it is actually
export foo from ‘./foo'
I personally would find such a construct terribly confusing. But then
again I find the entire default export business terribly confusing. ; )
___
es-discuss mailing list
es-discuss@mozilla.org
9 matches
Mail list logo