03:18
<shu>
we seem to be pretty over the 2-day time limit this time, if anyone think they can squeeze their items down into a smaller timeslot
08:10
<Jack Works>
Hi I have a syntax question
08:10
<Jack Works>
Does super() only valid in class constructors?
08:11
<Jack Works>
And does new.target isn't possible to be a generator (async or not) function?
08:27
<sideshowbarker>
Does anybody understand what https://github.com/mdn/content/issues/8118 is asking?
12:42
<James DiGioia>
Does Array.from treat it as an ArrayLike first or an iterable first? If you provide it an object that's both, which does it use to convert?
12:42
<James DiGioia>
That's my guess, anyway
16:27
<bakkot>
Jack Works: super() is indeed only valid in class constructors (with the caveat that super() also works in nested arrows in a class constructor, as in (class extends Object { constructor(){ () => super() } }))
16:27
<bakkot>
but new.target is legal in generators
16:33
<Jack Works>
but new.target is legal in generators
It's legal but generator function cannot be the third parameter of Reflect.construct
17:10
<bakkot>
you can't construct a shorthand method either, and it's legal there too
17:10
<bakkot>
¯\_(ツ)_/¯
20:49
<ljharb>
iirc it's legal in shorthand methods tho because the plan (at the time) was to have [[HomeObject]] be alterable, and have super point to that
20:49
<ljharb>
i don't remember anyone talking about standalone generator functions in that context
21:11
<bakkot>
ah, by "it" I meant new.target, not super()
21:11
<bakkot>
new.target wouldn't have anything to do with [[HomeObject]]