?
u
m
/
p
1-9
0
`
인터페이스는 특정 명세를 만족하는 값들을 갖는
iterable 인터페이스는
프로퍼티 (Property) | 값 (Value) | 요구사항 (Requirements) |
---|---|---|
%Symbol.iterator%
|
이터레이터 객체를 반환하는 함수 |
반환된 객체는 |
iterator 인터페이스를 구현하는 객체는
프로퍼티 | 값 | 요구사항 |
---|---|---|
|
IteratorResult 객체를 반환하는 함수 |
반환된 객체는 next 메서드에 대한 이전 호출이 next 호출도 |
next
함수에 인수를 전달할 수 있지만, 그것들의 해석 및 유효성은 대상 이터레이터에 의존한다. for-of 문 및 기타 일반적인 이터레이터 소비자는 어떤 인수도 전달하지 않으므로, 그러한 방식으로 사용될 것을 기대하는 이터레이터 객체는 인수 없이 호출되는 상황을 처리할 준비가 되어 있어야 한다.
프로퍼티 | 값 | 요구사항 |
---|---|---|
|
IteratorResult 객체를 반환하는 함수 |
반환된 객체는 next 메서드를 호출할 의도가 없음을 이터레이터 객체에 알린다. 반환된 IteratorResult 객체는 대개 return 메서드의 인수로 전달된 값을 가진 |
|
IteratorResult 객체를 반환하는 함수 |
반환된 객체는 throw 하는 것이다. 메서드가 throw 하지 않는 경우, 반환된 IteratorResult 객체는 대개 |
보통 이러한 메서드의 호출자는 호출 전에 그 존재를 확인해야 한다. for
-of
, yield*
, 배열 구조 분해 등을 포함한 특정 ECMAScript 언어 기능은 존재 여부를 확인한 후 이들 메서드를 호출한다. 이터러블 객체를 인수로 받는 대부분의 ECMAScript 라이브러리 함수도 조건부로 이들을 호출한다.
async iterable 인터페이스는
프로퍼티 | 값 | 요구사항 |
---|---|---|
%Symbol.asyncIterator% |
async 이터레이터 객체를 반환하는 함수 | 반환된 객체는 |
async iterator 인터페이스를 구현하는 객체는
프로퍼티 | 값 | 요구사항 |
---|---|---|
IteratorResult 객체에 대한 promise 를 반환하는 함수 |
반환된 promise가 이행(fulfill)될 때, 추가로, 이행 값으로 사용되는 IteratorResult 객체는 promise(또는 "thenable")가 아닌 값을 가진 |
next
함수에 인수를 전달할 수 있지만, 그것들의 해석 및 유효성은 대상 async iterator에 의존한다. for
-await
-of
문 및 기타 일반적인 async iterator 소비자는 인수를 전달하지 않으므로, 그러한 방식으로 사용될 것을 기대하는 async iterator 객체는 인수 없이 호출되는 상황을 처리할 준비가 되어 있어야 한다.
프로퍼티 | 값 | 요구사항 |
---|---|---|
IteratorResult 객체에 대한 promise 를 반환하는 함수 |
반환된 promise가 이행될 때, 추가로, 이행 값으로 사용되는 IteratorResult 객체는 promise(또는 "thenable")가 아닌 값을 가진 |
|
IteratorResult 객체에 대한 promise 를 반환하는 함수 |
반환된 promise가 이행될 때, 반환된 promise가 이행되는 경우, IteratorResult 객체 이행 값은 보통 |
일반적으로 이러한 메서드의 호출자는 호출 전에 그 존재를 확인해야 한다. for
-await
-of
및 yield*
등을 포함한 특정 ECMAScript 언어 기능은 존재 여부를 확인한 뒤 이들 메서드를 호출한다.
IteratorResult 인터페이스는
프로퍼티 | 값 | 요구사항 |
---|---|---|
|
Boolean |
이는 이터레이터 next 메서드 호출의 결과 상태이다. 이터레이터의 끝에 도달했다면 |
|
|
done 이 |
Iterator Helper 객체는 특정 소스 이터레이터 객체의 지연(lazy) 변환을 표현하는
%IteratorHelperPrototype% 객체:
이 프로퍼티는 { [[Writable]]:
Iterator
이 함수는 호출될 때 다음 단계를 수행한다:
%WrapForValidIteratorPrototype% 객체:
Iterator.prototype의 초기 값은
이 프로퍼티는 { [[Writable]]:
Iterator 프로토타입 객체:
이 명세에서
다음 식은 ECMAScript 코드가 %Iterator.prototype% 객체에 접근할 수 있는 한 가지 방법이다:
Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))
Iterator.prototype.constructor
는 { [[Enumerable]]:
[[Get]] 특성의 값은 인수가 필요 없는 내장 함수이다. 호출 시 다음 단계를 수행한다:
[[Set]] 특성의 값은 인수 v 를 받는 내장 함수이다. 호출 시 다음 단계를 수행한다:
대부분의 내장 프로토타입에 있는
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 함수는 호출될 때 다음 단계를 수행한다:
이 함수의
Iterator.prototype[%Symbol.toStringTag%]
는 { [[Enumerable]]:
[[Get]] 특성의 값은 인수가 필요 없는 내장 함수이다. 호출 시 다음 단계를 수행한다:
[[Set]] 특성의 값은 인수 v 를 받는 내장 함수이다. 호출 시 다음 단계를 수행한다:
대부분의 내장 프로토타입에 있는
%AsyncIteratorPrototype% 객체:
이 명세에서
이 함수는 호출될 때 다음 단계를 수행한다:
이 함수의
Async-from-Sync Iterator 객체는 특정 동기(synchronous) 이터레이터를 적응(adapt)한 async 이터레이터이다. Async-from-Sync Iterator 객체는 ECMAScript 코드에서 직접 접근할 수 없다. Async-from-Sync Iterator 객체에 대한 명명된
The abstract operation CreateAsyncFromSyncIterator takes argument syncIteratorRecord (an
%AsyncFromSyncIteratorPrototype% 객체:
throw
메서드가 없다면, capability 거부 전에 정리할 기회를 주기 위해 그것을 닫는다.throw
메서드가 없음)을 나타내기 위해 Async-from-Sync
내부 슬롯 (Internal Slot) | 타입 (Type) | 설명 (Description) |
---|---|---|
[[SyncIteratorRecord]] |
|
적응되고 있는 원래의 동기 이터레이터를 나타낸다. |
The abstract operation AsyncFromSyncIteratorContinuation takes arguments result (an Object), promiseCapability (a
Promise 는 지연(그리고 비동기일 수도 있는) 계산의 최종 결과에 대한 자리표시자로 사용되는 객체이다.
모든 Promise 는 상호 배타적인 세 가지 상태 중 하나이다: fulfilled, rejected, pending:
p
는 p.then(f, r)
이 즉시 함수 f
를 호출하는 p
는 p.then(f, r)
이 즉시 함수 r
를 호출하는 Promise 가 pending 이 아니면, 즉 fulfilled 이거나 rejected 이면 settled 되었다고 말한다.
Promise 가 settled 이거나 다른 promise 의 상태에 “고정(lock in)” 되었으면 resolved 되었다고 한다. 이미 resolved 된 promise 를 resolve 또는 reject 하려는 시도는 아무 효과가 없다. Promise 가 resolved 가 아니면 unresolved 이다. Unresolved promise 는 항상 pending 상태이다. Resolved promise 는 pending, fulfilled 또는 rejected 일 수 있다.
PromiseCapability Record 는 특정 Promise 또는 Promise 유사 객체와 그것을 resolve 또는 reject 할 수 있는 함수들을 함께 캡슐화하기 위해 사용되는
PromiseCapability Record 는
Field Name | Value | Meaning |
---|---|---|
[[Promise]] | an Object | Promise 로 사용할 수 있는 객체. |
[[Resolve]] | a function object | 해당 promise 를 resolve 하는 데 사용되는 함수. |
[[Reject]] | a function object | 해당 promise 를 reject 하는 데 사용되는 함수. |
IfAbruptRejectPromise 는
는 다음과 동일한 의미이다:
PromiseReaction Record 는 promise 가 특정 값으로 resolved 또는 rejected 될 때 어떻게 반응해야 하는지를 저장하기 위한
PromiseReaction Record 는
Field Name | Value | Meaning |
---|---|---|
[[Capability]] |
a |
이 레코드가 반응 핸들러를 제공하는 promise 의 capability. |
[[Type]] |
|
[[Handler]] 가 |
[[Handler]] |
a |
들어오는 값에 적용되어 그 반환 값이 파생된 promise 에서 일어날 일을 결정하는 함수. [[Handler]] 가 |
The abstract operation CreateResolvingFunctions takes argument promise (a Promise) and returns a
Promise reject 함수는 [[Promise]] 와 [[AlreadyResolved]] 내부 슬롯을 가진 익명 내장 함수이다.
Promise reject 함수가 인수 reason 과 함께 호출되면 다음 단계를 수행한다:
Promise reject 함수의
Promise resolve 함수는 [[Promise]] 와 [[AlreadyResolved]] 내부 슬롯을 가진 익명 내장 함수이다.
Promise resolve 함수가 인수 resolution 과 함께 호출되면 다음 단계를 수행한다:
Promise resolve 함수의
The abstract operation FulfillPromise takes arguments promise (a Promise) and value (an ECMAScript language value) and returns
The abstract operation NewPromiseCapability takes argument C (an ECMAScript language value) and returns either a resolve
, reject
함수를 추출하려 시도한다. 그 promise 와 두 함수는 새로운
The abstract operation IsPromise takes argument x (an ECMAScript language value) and returns a Boolean. 객체에 promise 브랜드가 있는지 검사한다. It performs the following steps when called:
The abstract operation RejectPromise takes arguments promise (a Promise) and reason (an ECMAScript language value) and returns
The abstract operation TriggerPromiseReactions takes arguments reactions (a
The host-defined abstract operation HostPromiseRejectionTracker takes arguments promise (a Promise) and operation (
HostPromiseRejectionTracker 의 기본 구현은
HostPromiseRejectionTracker 는 두 시나리오에서 호출된다:
전형적인 구현은 처리되지 않은 rejection 을 개발자에게 알리려고 시도하며, 이후 새로운 핸들러가 부착되어 이전 알림이 무효화되는 경우도 알리도록 주의할 수 있다.
operation 이
The abstract operation NewPromiseReactionJob takes arguments reaction (a
The abstract operation NewPromiseResolveThenableJob takes arguments promiseToResolve (a Promise), thenable (an Object), and then (a
Promise
extends
절 값으로 사용될 수 있다. 지정된 Promise 동작을 상속하려는 서브클래스 Promise
및 Promise.prototype
내장 메서드를 지원하는 데 필요한 내부 상태로 서브클래스 인스턴스를 생성 및 초기화하기 위해 Promise super
호출을 포함해야 한다.이 함수는 호출될 때 다음 단계를 수행한다:
executor 인수는
executor 에 전달되는 resolve 함수는 단일 인수를 받는다. executor 코드는 결국 resolve 함수를 호출해 관련 Promise 를 resolve 하려 함을 나타낼 수 있다. resolve 함수에 전달되는 인수는 지연 동작의 최종 값을 나타내며 실제 이행 값이거나 그것이 이행될 경우 값을 제공할 다른 promise 일 수 있다.
executor 에 전달되는 reject 함수는 단일 인수를 받는다. executor 코드는 결국 reject 함수를 호출해 관련 Promise 가 rejected 되었고 결코 fulfilled 되지 않을 것임을 나타낼 수 있다. reject 함수에 전달되는 인수는 promise 의 rejection 값으로 사용되며 일반적으로 Error 객체이다.
Promise
Promise
이 함수는 전달된 promise 들의 이행 값 배열로 이행되는 새로운 promise 를 반환하거나, 가장 먼저 reject 된 promise 의 reason 으로 reject 된다. 이 알고리즘을 수행하면서 전달된
The abstract operation GetPromiseResolve takes argument promiseConstructor (a constructor) and returns either a
The abstract operation PerformPromiseAll takes arguments iteratorRecord (an
Promise.all
Resolve Element FunctionsPromise.all
Resolve Element FunctionsPromise.all
Resolve Element FunctionsPromise.all
resolve 요소 함수는 특정 Promise.all
요소를 resolve 하는 데 사용되는 익명 내장 함수이다. 각 Promise.all
resolve 요소 함수는 [[Index]], [[Values]], [[Capability]], [[RemainingElements]], [[AlreadyCalled]] 내부 슬롯을 가진다.
Promise.all
resolve 요소 함수가 인수 x 와 함께 호출되면 다음 단계를 수행한다:
Promise.all
resolve 요소 함수의
이 함수는 모든 원래 promise 가 settled(즉 fulfilled 또는 rejected) 된 후에, promise 상태 스냅샷 객체들의 배열로 이행되는 promise 를 반환한다. 이 알고리즘을 수행하면서 전달된
The abstract operation PerformPromiseAllSettled takes arguments iteratorRecord (an
Promise.allSettled
Resolve Element FunctionsPromise.allSettled
Resolve Element FunctionsPromise.allSettled
Reject Element FunctionsPromise.allSettled
Reject Element FunctionsPromise.allSettled
Resolve Element FunctionsPromise.allSettled
resolve 요소 함수는 특정 Promise.allSettled
요소를 resolve 하는 데 사용되는 익명 내장 함수이다. 각 함수는 [[Index]], [[Values]], [[Capability]], [[RemainingElements]], [[AlreadyCalled]] 내부 슬롯을 가진다.
Promise.allSettled
resolve 요소 함수가 인수 x 로 호출되면 다음 단계를 수행한다:
Promise.allSettled
resolve 요소 함수의
Promise.allSettled
Reject Element FunctionsPromise.allSettled
reject 요소 함수는 특정 Promise.allSettled
요소를 reject 하는 데 사용되는 익명 내장 함수이다. 각 함수는 [[Index]], [[Values]], [[Capability]], [[RemainingElements]], [[AlreadyCalled]] 내부 슬롯을 가진다.
Promise.allSettled
reject 요소 함수가 인수 x 로 호출되면 다음 단계를 수행한다:
Promise.allSettled
reject 요소 함수의
이 함수는 전달된 promise 중 처음 fulfilled 되는 promise 로 fulfilled 되거나, 모두 rejected 되면 rejection reason 들을 담은 AggregateError
로 reject 되는 promise 를 반환한다. 이 알고리즘을 수행하면서 전달된
The abstract operation PerformPromiseAny takes arguments iteratorRecord (an
Promise.any
Reject Element FunctionsPromise.any
Reject Element FunctionsPromise.any
Reject Element FunctionsPromise.any
reject 요소 함수는 특정 Promise.any
요소를 reject 하는 데 사용되는 익명 내장 함수이다. 각 함수는 [[Index]], [[Errors]], [[Capability]], [[RemainingElements]], [[AlreadyCalled]] 내부 슬롯을 가진다.
Promise.any
reject 요소 함수가 인수 x 로 호출되면 다음 단계를 수행한다:
Promise.any
reject 요소 함수의
Promise.prototype
의 초기 값은
이 프로퍼티는 { [[Writable]]:
이 함수는 가장 먼저 settle 되는 전달된 promise 와 동일한 방식으로 settle 되는 새 promise 를 반환한다. 이 알고리즘을 수행하면서 전달된 iterable 의 모든 요소를 promise 로 resolve 한다.
iterable 인수가 어떤 값도 산출하지 않거나 iterable 이 산출한 promise 들 중 어느 것도 settle 되지 않으면, 이 메서드가 반환하는 pending promise 는 결코 settle 되지 않는다.
The abstract operation PerformPromiseRace takes arguments iteratorRecord (an
이 함수는 전달된 인수로 reject 된 새로운 promise 를 반환한다.
이 함수는 전달된 인수로 resolve 된 새로운 promise 를 반환하거나, 인수가 이
The abstract operation PromiseResolve takes arguments C (an Object) and x (an ECMAScript language value) and returns either a
이 함수는 호출될 때 다음 단계를 수행한다:
이 함수는 세 개의 프로퍼티를 가진 객체를 반환한다: 새로운 promise 와 그에 연관된 resolve
및 reject
함수.
Promise[%Symbol.species%]
는 set 접근자 함수가
이 함수의
Promise 프로토타입 메서드는 일반적으로 파생 객체를 생성하기 위해
Promise 프로토타입 객체는 다음과 같다:
이 메서드는 호출될 때 다음 단계를 수행한다:
Promise.prototype.constructor
의 초기 값은
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
The abstract operation PerformPromiseThen takes arguments promise (a Promise), onFulfilled (an ECMAScript language value), and onRejected (an ECMAScript language value) and optional argument resultCapability (a
이 프로퍼티는 { [[Writable]]:
Promise 인스턴스는 (내재
Internal Slot | Type | Description |
---|---|---|
[[PromiseState]] |
|
해당 promise 의 then 메서드로의 호출에 어떻게 반응할지 결정한다.
|
[[PromiseResult]] |
an ECMAScript language value or |
promise 가 fulfilled 또는 rejected 된 값(있다면). [[PromiseState]] 가 |
[[PromiseFulfillReactions]] |
a |
promise 가 |
[[PromiseRejectReactions]] |
a |
promise 가 |
[[PromiseIsHandled]] | a Boolean | 이 promise 가 한 번이라도 fulfillment 또는 rejection 핸들러를 가졌는지 나타내며, 처리되지 않은 거부 추적(unhandled rejection tracking)에 사용된다. |
GeneratorFunction 들은 보통
GeneratorFunction
Function
의 서브클래스이다.GeneratorFunction (…)
은 동일한 인수로 new GeneratorFunction (…)
객체 생성 표현식과 동등하다.extends
절 값으로 사용할 수 있다. 지정된 GeneratorFunction 동작을 상속하려는 서브클래스 super
호출을 포함해야 한다. 제너레이터 마지막 인수(있다면)는 제너레이터 함수의 본문(실행 코드)을 지정한다; 그 앞의 인수들은 형식 매개변수를 지정한다.
이 함수는 호출될 때 다음 단계를 수행한다:
GeneratorFunction
GeneratorFunction.prototype
의 초기 값은
이 프로퍼티는 { [[Writable]]:
GeneratorFunction 프로토타입 객체는 다음과 같다:
GeneratorFunction.prototype.constructor
의 초기 값은
이 프로퍼티는 { [[Writable]]:
GeneratorFunction.prototype.prototype
의 초기 값은
이 프로퍼티는 { [[Writable]]:
이 프로퍼티는 { [[Writable]]:
모든 GeneratorFunction 인스턴스는 ECMAScript
각 GeneratorFunction 인스턴스는 다음 자체 프로퍼티들을 가진다:
GeneratorFunction 인스턴스가 생성될 때마다 또 다른
이 프로퍼티는 { [[Writable]]:
Function 인스턴스와 달리, GeneratorFunction 의
AsyncGeneratorFunction 들은 보통
AsyncGeneratorFunction
Function
의 서브클래스이다.AsyncGeneratorFunction (...)
호출은 동일한 인수의 new AsyncGeneratorFunction (...)
과 동등하다.extends
절 값으로 사용할 수 있다. 지정된 AsyncGeneratorFunction 동작을 상속하려는 서브클래스 super
호출을 포함해야 한다. async generator 마지막 인수(있다면)는 async generator 함수의 본문(실행 코드)을 지정한다; 그 앞의 인수들은 형식 매개변수를 지정한다.
이 함수는 호출될 때 다음 단계를 수행한다:
AsyncGeneratorFunction
AsyncGeneratorFunction.prototype
의 초기 값은
이 프로퍼티는 { [[Writable]]:
AsyncGeneratorFunction 프로토타입 객체는 다음과 같다:
AsyncGeneratorFunction.prototype.constructor
의 초기 값은
이 프로퍼티는 { [[Writable]]:
AsyncGeneratorFunction.prototype.prototype
의 초기 값은
이 프로퍼티는 { [[Writable]]:
이 프로퍼티는 { [[Writable]]:
모든 AsyncGeneratorFunction 인스턴스는 ECMAScript
각 AsyncGeneratorFunction 인스턴스는 다음 자체 프로퍼티들을 가진다:
이 프로퍼티는 { [[Writable]]:
AsyncGeneratorFunction 인스턴스가 생성될 때마다 또 다른
이 프로퍼티는 { [[Writable]]:
function 인스턴스와 달리, AsyncGeneratorFunction 의
Generator 는 제너레이터 함수를 호출하여 생성되며 이터레이터 인터페이스와
Generator 인스턴스는 그것을 생성한 제너레이터 함수의
%GeneratorPrototype% 객체는 다음과 같다:
.constructor
의 초기 값은
이 프로퍼티는 { [[Writable]]:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 메서드는 호출될 때 다음 단계를 수행한다:
이 프로퍼티는 { [[Writable]]:
Generator 인스턴스는
Internal Slot | Type | Description |
---|---|---|
[[GeneratorState]] |
|
제너레이터의 현재 실행 상태. |
[[GeneratorContext]] |
an |
이 제너레이터의 코드를 실행할 때 사용되는 실행 컨텍스트. |
[[GeneratorBrand]] |
a String or |
서로 다른 종류의 제너레이터를 구분하는 브랜드. ECMAScript 소스 텍스트로 선언된 제너레이터의 [[GeneratorBrand]] 는 항상 |
The abstract operation GeneratorStart takes arguments generator (a Generator) and generatorBody (a
The abstract operation GeneratorValidate takes arguments generator (an ECMAScript language value) and generatorBrand (a String or
The abstract operation GeneratorResume takes arguments generator (an ECMAScript language value), value (an ECMAScript language value or
The abstract operation GeneratorResumeAbrupt takes arguments generator (an ECMAScript language value), abruptCompletion (a
The abstract operation GetGeneratorKind takes no arguments and returns
The abstract operation GeneratorYield takes argument iteratorResult (an Object that conforms to the IteratorResult interface) and returns either a
The abstract operation Yield takes argument value (an ECMAScript language value) and returns either a
The abstract operation CreateIteratorFromClosure takes arguments closure (an
AsyncGenerator 는 async 제너레이터 함수를 호출하여 생성되며 async 이터레이터 인터페이스와
AsyncGenerator 인스턴스는 그것을 생성한 async 제너레이터 함수의
%AsyncGeneratorPrototype% 객체:
.constructor
의 초기 값은
이 프로퍼티는 { [[Writable]]:
이 프로퍼티는 { [[Writable]]:
AsyncGenerator 인스턴스는 아래에 기술된 내부 슬롯을 가지고 초기화된다:
Internal Slot | Type | Description |
---|---|---|
[[AsyncGeneratorState]] | async 제너레이터의 현재 실행 상태. | |
[[AsyncGeneratorContext]] | an |
이 async 제너레이터의 코드를 실행할 때 사용되는 실행 컨텍스트. |
[[AsyncGeneratorQueue]] | a |
async 제너레이터 재개 요청을 나타내는 레코드. 상태 전이 중을 제외하면 [[AsyncGeneratorState]] 가 |
[[GeneratorBrand]] | a String or |
서로 다른 종류의 async 제너레이터를 구분하는 브랜드. ECMAScript 소스 텍스트로 선언된 async 제너레이터의 [[GeneratorBrand]] 는 항상 |
AsyncGeneratorRequest 는 async 제너레이터를 어떻게 재개해야 하는지에 대한 정보를 저장하고 해당 promise 를 이행하거나 거부하기 위한 capability 를 포함하는
다음 필드를 가진다:
Field Name | Value | Meaning |
---|---|---|
[[Completion]] | a |
async 제너레이터를 재개할 때 사용할 |
[[Capability]] | a |
이 요청과 연관된 promise capability. |
The abstract operation AsyncGeneratorStart takes arguments generator (an AsyncGenerator) and generatorBody (a
The abstract operation AsyncGeneratorValidate takes arguments generator (an ECMAScript language value) and generatorBrand (a String or
The abstract operation AsyncGeneratorEnqueue takes arguments generator (an AsyncGenerator), completion (a
The abstract operation AsyncGeneratorCompleteStep takes arguments generator (an AsyncGenerator), completion (a
The abstract operation AsyncGeneratorResume takes arguments generator (an AsyncGenerator) and completion (a
The abstract operation AsyncGeneratorUnwrapYieldResumption takes argument resumptionValue (a
The abstract operation AsyncGeneratorYield takes argument value (an ECMAScript language value) and returns either a
The abstract operation AsyncGeneratorAwaitReturn takes argument generator (an AsyncGenerator) and returns
The abstract operation AsyncGeneratorDrainQueue takes argument generator (an AsyncGenerator) and returns
The abstract operation CreateAsyncIteratorFromClosure takes arguments closure (an
AsyncFunction 들은 보통
AsyncFunction
Function
의 서브클래스이다.AsyncFunction(…)
은 동일한 인수의 new AsyncFunction(…)
객체 생성 표현식과 동등하다.extends
절 값으로 사용할 수 있다. 지정된 AsyncFunction 동작을 상속하려는 서브클래스 super
호출을 포함해야 한다. async 마지막 인수(있다면)는 async 함수의 본문(실행 코드)을 지정한다. 그 앞의 인수들은 형식 매개변수를 지정한다.
이 함수는 호출될 때 다음 단계를 수행한다:
AsyncFunction
AsyncFunction.prototype
의 초기 값은
이 프로퍼티는 { [[Writable]]:
AsyncFunction 프로토타입 객체:
AsyncFunction.prototype.constructor
의 초기 값은
이 프로퍼티는 { [[Writable]]:
이 프로퍼티는 { [[Writable]]:
모든 AsyncFunction 인스턴스는 ECMAScript
각 AsyncFunction 인스턴스는 다음 자체 프로퍼티를 가진다:
The abstract operation AsyncFunctionStart takes arguments promiseCapability (a
The abstract operation AsyncBlockStart takes arguments promiseCapability (a
The abstract operation Await takes argument value (an ECMAScript language value) and returns either a