Skip to content

Commit cf49c0c

Browse files
authored
explainer: Custom constructors don’t receive args
Fixes #22. Spec is already correct.
1 parent 18917e4 commit cf49c0c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ The developer must choose between using Array.fromAsync and Promise.all (see
189189
### Generic factory method
190190
Array.fromAsync is a generic factory method. It does not require that its this
191191
receiver be the Array constructor. fromAsync can be transferred to or inherited
192-
by any other constructor with a single numeric parameter. In that case, the
193-
final result will be the data structure created by that constructor (with 0 as
194-
its argument), and with each value yielded by the input being assigned to the
195-
data structure’s numeric properties. (Symbol.species is not involved at all.) If
196-
the this receiver is not a constructor, then fromAsync creates an array as
197-
usual. This matches the behavior of Array.from.
192+
by any other constructor. In that case, the final result will be the data
193+
structure created by that constructor (with no arguments), and with each value
194+
yielded by the input being assigned to the data structure’s numeric properties.
195+
(Symbol.species is not involved at all.) If the this receiver is not a
196+
constructor, then fromAsync creates an array as usual. This matches the behavior
197+
of Array.from.
198198

199199
```js
200200
async function * asyncGen (n) {

0 commit comments

Comments
 (0)