From a63244cb65e0e559e4ea481f7c495f29ba287ed3 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 27 Mar 2025 23:52:07 +0000 Subject: [PATCH 1/3] Editorial: Rename mapfn to mapper See: https://github.com/tc39/ecma262/commit/4bc2d8dedb662edb8870b13d5b35d01ff5312ee9 --- spec.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec.html b/spec.html index bf03505..d6f3f34 100644 --- a/spec.html +++ b/spec.html @@ -55,7 +55,7 @@

Array Objects

Properties of the Array Constructor

-

Array.fromAsync ( _asyncItems_ [ , _mapfn_ [ , _thisArg_ ] ] )

+

Array.fromAsync ( _asyncItems_ [ , _mapper_ [ , _thisArg_ ] ] )

This section is a wholly new subsection of the Array.fromAsync ( _asyncItems_ [ , _mapfn_ [ , _thisArg_ ] ] ) 1. Let _C_ be the *this* value. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _fromAsyncClosure_ be a new Abstract Closure with no parameters that captures _C_, _mapfn_, and _thisArg_ and performs the following steps when called: - 1. If _mapfn_ is *undefined*, let _mapping_ be *false*. + 1. Let _fromAsyncClosure_ be a new Abstract Closure with no parameters that captures _C_, _mapper_, and _thisArg_ and performs the following steps when called: + 1. If _mapper_ is *undefined*, let _mapping_ be *false*. 1. Else, - 1. If IsCallable(_mapfn_) is *false*, throw a *TypeError* exception. + 1. If IsCallable(_mapper_) is *false*, throw a *TypeError* exception. 1. Let _mapping_ be *true*. 1. Let _usingAsyncIterator_ be ? GetMethod(_asyncItems_, @@asyncIterator). 1. If _usingAsyncIterator_ is *undefined*, then @@ -102,7 +102,7 @@

Array.fromAsync ( _asyncItems_ [ , _mapfn_ [ , _thisArg_ ] ] )Array.fromAsync ( _asyncItems_ [ , _mapfn_ [ , _thisArg_ ] ] ) Date: Thu, 27 Mar 2025 23:58:39 +0000 Subject: [PATCH 2/3] Editorial: Replace GetIterator with GetIteratorFromMethod See: https://github.com/tc39/ecma262/commit/956e5af16984de6f37b2bd65c433c77dc975a35c --- spec.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.html b/spec.html index d6f3f34..e516ea9 100644 --- a/spec.html +++ b/spec.html @@ -79,9 +79,9 @@

Array.fromAsync ( _asyncItems_ [ , _mapper_ [ , _thisArg_ ] ] ) Date: Fri, 28 Mar 2025 00:24:15 +0000 Subject: [PATCH 3/3] Editorial: Capture asyncItems in Abstract Closure --- spec.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.html b/spec.html index e516ea9..1a6c846 100644 --- a/spec.html +++ b/spec.html @@ -69,7 +69,7 @@

Array.fromAsync ( _asyncItems_ [ , _mapper_ [ , _thisArg_ ] ] ) 1. Let _C_ be the *this* value. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _fromAsyncClosure_ be a new Abstract Closure with no parameters that captures _C_, _mapper_, and _thisArg_ and performs the following steps when called: + 1. Let _fromAsyncClosure_ be a new Abstract Closure with no parameters that captures _C_, _asyncItems_, _mapper_, and _thisArg_ and performs the following steps when called: 1. If _mapper_ is *undefined*, let _mapping_ be *false*. 1. Else, 1. If IsCallable(_mapper_) is *false*, throw a *TypeError* exception.