René's URL Explorer Experiment


Title: Proposal: Async Functions · Issue #1664 · microsoft/TypeScript · GitHub

Open Graph Title: Proposal: Async Functions · Issue #1664 · microsoft/TypeScript

X Title: Proposal: Async Functions · Issue #1664 · microsoft/TypeScript

Description: Async Functions 1 Async Functions This is a spec proposal for the addition of Async Functions (also known as async..await) as a feature of TypeScript. 2 Use Cases Async Functions allow TypeScript developers to author functions that are e...

Open Graph Description: Async Functions 1 Async Functions This is a spec proposal for the addition of Async Functions (also known as async..await) as a feature of TypeScript. 2 Use Cases Async Functions allow TypeScript d...

X Description: Async Functions 1 Async Functions This is a spec proposal for the addition of Async Functions (also known as async..await) as a feature of TypeScript. 2 Use Cases Async Functions allow TypeScript d...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/1664

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: Async Functions","articleBody":"# Async Functions\n# \u003ca name=\"1\"/>1 Async Functions\n\nThis is a spec proposal for the addition of _Async Functions_ (also known as `async..await`) as a feature of TypeScript.\n# \u003ca name=\"2\"/>2 Use Cases\n\n_Async Functions_ allow TypeScript developers to author functions that are expected to invoke an asynchronous operation and await its result without blocking normal execution of the program. This accomplished through the use of an ES6-compatible `Promise` implementation, and transposition of the function body into a compatible form to resume execution when the awaited asynchronous operation completes.\n\nThis is based primarily on the Async Functions strawman proposal for ECMAScript, and C# 5.0 § 10.15 _Async Functions_.\n# \u003ca name=\"3\"/>3 Introduction\n## \u003ca name=\"3.1\"/>3.1 Syntax\n\nAn _Async Function_ is a _JavaScript Function_, _Parameterized Arrow Function_, _Method_, or _Get Accessor_ that has been prefixed with the `async` modifier. This modifier informs the compiler that function body transposition is required, and that the keyword `await` should be treated as a unary expression instead of an identifier. An _Async Function_ must provide a return type annotation that points to a compatible `Promise` type. Return type inference can only be used if there is a globally defined, compatible `Promise` type.\n\nExample:\n\n``` TypeScript\nvar p: Promise\u003cnumber> = /* ... */;  \nasync function fn(): Promise\u003cnumber> {  \n  var i = await p; // suspend execution until 'p' is settled. 'i' has type \"number\"  \n  return 1 + i;  \n}  \n\nvar a = async (): Promise\u003cnumber> => 1 + await p; // suspends execution.  \nvar a = async () => 1 + await p; // suspends execution. return type is inferred as \"Promise\u003cnumber>\" when compiling with --target ES6  \nvar fe = async function(): Promise\u003cnumber> {  \n  var i = await p; // suspend execution until 'p' is settled. 'i' has type \"number\"  \n  return 1 + i;  \n}  \n\nclass C {  \n  async m(): Promise\u003cnumber> {  \n    var i = await p; // suspend execution until 'p' is settled. 'i' has type \"number\"  \n    return 1 + i;  \n  }  \n\n  async get p(): Promise\u003cnumber> {  \n    var i = await p; // suspend execution until 'p' is settled. 'i' has type \"number\"  \n    return 1 + i;  \n  }  \n}\n```\n## \u003ca name=\"3.2\"/>3.2 Transformations\n\nTo support this feature, the compiler needs to make certain transformations to the function body of an _Async Function_. The type of transformations performed depends on whether the current compilation target is ES6, or ES5/ES3.\n### \u003ca name=\"3.2.1\"/>3.2.1 ES6 Transformations\n\nDuring compilation of an _Async Function_ when targeting ES6, the following transformations are applied:\n- The new function body consists of a single return statement whose expression is a new instance of the promise type supplied as the return type of the _Async Function_.\n- The original function body is enclosed in a _Generator Function_.\n- Any `await` expressions inside the original function body are transformed into a compatible `yield` expression.\n  - As the precedence of `yield` is much lower than `await`, it may be necessary to enclose the `yield` expression in parenthesis if it is contained in the left-hand-side of a binary expression.\n- The _Generator Function_ is executed and the resulting generator is passed as an argument to the `__awaiter` helper function.\n- The result of the `__awaiter` helper function is passed as an argument to the promise resolve callback.\n\nExample:\n\n``` TypeScript\n// async.ts  \nvar p0: Promise\u003cnumber> = /* ... */;  \nvar p1: Promise\u003cnumber> = /* ... */;  \nasync function fn() {  \n  var i = await p0;  \n  return await p1 + i;  \n}  \n\n// async.js  \nvar __awaiter = /* ... */;  \n\nfunction fn() {  \n  return new Promise(function (_resolve) {  \n    _resolve(__awaiter(function* () {  \n      var i = yield p0;  \n      return (yield p1) + i;  \n    }()));  \n  });  \n}\n```\n### \u003ca name=\"3.2.2\"/>3.2.2 ES5/ES3 Transformations\n\nAs ES5 and earlier do not support _Generator Functions_, a more complex transformation is required. To support this transformation, `__generator` helper function will be also emitted along with the `__awaiter` helper function, and a much more comprehensive set of transformations would be applied:\n- The new function body consists of a single return statement whose expression is a new instance of the promise type supplied as the return type of the _Async Function_.\n- The original function body is enclosed in a function expression with a single parameter that is passed as an argument to the `__generator` helper function.\n- All hoisted declarations (variable declarations and function declarations) in the original function body are extracted and added to the top of the new function body.\n- The original function body is rewritten into a series of case clauses in a switch statement.\n- Each statement in the function body that contains an `await` expression is rewritten into flattened set of instructions that are interpreted by the `__generator` helper function.\n- Temporary locals are generated to hold onto the values for partially-applied expressions to preserve side effects expected in the original source.\n- Logical binary expressions that contain an `await` expression are rewritten to preserve shortcutting.\n- Assignment expressions that contain an `await` are rewritten to store portions left-hand side of the assignment in temporary locals to preserve side effects.\n- Call expressions that contain an `await` in the argument list are rewritten to store the callee and this argument, and to instead call the `call` method of the callee.\n- New expressions that contain an `await` in the argument list are rewritten to preserve side effects.\n- Array literal expressions that contain an `await` in the element list are rewritten to preserve side effects.\n- Object literal expressions that contain an `await` in the element list are rewritten to preserve side effects.\n- try  statements that contain an  await  in the  try  block,  catch  clause, or  finally  block are rewritten and tracked as a protected region by the `__generator` helper function.\n- The variable of a `catch` clause is renamed to a unique identifier and all instances of the symbol are renamed to preserve the block scope behavior of a catch variable.\n- `break` and `continue` statements whose target is a statement that contains an `await` expression are rewritten to return an instruction interpreted by the `__generator` helper function.\n- `return` statements are rewritten to return an instruction interpreted by the `__generator` helper function.\n- `for..in` statements that contain an `await` expression are rewritten to capture the enumerable keys of the expression into a temporary array, to allow the iteration to be resumed when control is returned to the function following an `await` expression.\n- Labeled statements that contain an `await` expression are rewritten.\n- `await` expressions are rewritten to return an instruction interpreted by the  `__generator` helper function.\n\nExample:\n\n``` TypeScript\n// async.ts  \nvar p0: Promise\u003cnumber> = /* ... */;  \nvar p1: Promise\u003cnumber> = /* ... */;  \nasync function fn() {  \n    var i = await p0;  \n    return await p1 + i;  \n}  \n\n// async.js  \nvar __awaiter = /* ... */;  \nvar __generator = /* ... */;  \n\nfunction fn() {  \n    var i;  \n    return new Promise(function (_resolve) {  \n        resolve(__awaiter(__generator(function (_state) {  \n            switch (_state.label) {  \n                case 0: return [3 /*yield*/, p0];  \n                case 1:  \n                    i = _state.sent;  \n                    return [3 /*yield*/, p1];  \n                case 2:  \n                    return [2 /*return*/, _state.sent + i];  \n            }  \n        }));  \n    });  \n}\n```\n\nThe following is an example of an async function that contains a `try` statement:\n\n``` TypeScript\n// async.ts  \nvar p0: Promise\u003cnumber> = /* ... */;  \nvar p1: Promise\u003cnumber> = /* ... */;  \nasync function fn() {  \n    try {  \n        await p0;  \n    }  \n    catch (e) {  \n        alert(e.message);  \n    }  \n    finally {  \n        await p1;  \n    }  \n}  \n\n// async.js  \nvar __awaiter = /* ... */;  \nvar __generator = /* .. */;  \n\nfunction fn() {  \n    var i;  \n    return new Promise(function (_resolve) {  \n        resolve(__awaiter(__generator(function (_state) {  \n            switch (_state.label) {  \n                case 0:  \n                    _state.trys = [];  \n                    _state.label = 1;  \n                case 1:  \n                    _state.trys.push([1, 3, 4, 6]);  \n                    return [3 /*yield*/, p0];  \n                case 2:  \n                    return [5 /*break*/, 6];  \n                case 3:  \n                    _a = _state.error;  \n                    alert(_a.message);  \n                    return [5 /*break*/, 6];  \n                case 4:  \n                    return [3 /*yield*/, p1];  \n                case 5:  \n                    return [6 /*endfinally*/];  \n                case 6:  \n                    return [2 /*return*/];  \n            }  \n        }));  \n    });  \n    var _a;  \n}\n```\n\nAs a result of these transformations, the JavaScript output for an _Async Function_ can look quite different than the original source. When debugging the JavaScript output for an _Async Function_ it would be advisable to use a Source Map generated using the `--sourceMap` option for the compiler.\n# \u003ca name=\"4\"/>4 Promise\n\n_Async Functions_ require a compatible Promise abstraction to operate properly. A compatible implementation implements the following interfaces, which are to be added to the core library declarations (lib.d.ts):\n\n``` TypeScript\ninterface IPromiseConstructor\u003cT> {  \n    new (init: (resolve: (value: T | IPromise\u003cT>) => void, reject: (reason: any) => void) => void): IPromise\u003cT>;  \n}  \n\ninterface IPromise\u003cT> {  \n    then\u003cTResult>(onfulfilled: (value: T) => TResult | IPromise\u003cTResult>, onrejected: (reason: any) => TResult | IPromise\u003cTResult>): IPromise\u003cTResult>;  \n}\n```\n\nThe following libraries contain compatible Promise implementations:\n- ES6 - http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects\n- WinJS - http://msdn.microsoft.com/en-us/library/windows/apps/br211867.aspx\n- Q - https://github.com/kriskowal/q\n- RSVP - https://github.com/tildeio/rsvp.js/\n- Bluebird - https://github.com/petkaantonov/bluebird\n- es6-promise - https://github.com/jakearchibald/es6-promise\n- lie - https://github.com/calvinmetcalf/lie\n- when - https://github.com/cujojs/when\n- asyncjs - https://github.com/rbuckton/asyncjs\n# \u003ca name=\"A\"/>A Grammar\n## \u003ca name=\"A.1\"/>A.1 Types\n\n  _CallSignature_\u003csub> [Await,AsyncParameter] \u003c/sub>_:  \n   TypeParameters_\u003csub> opt\u003c/sub>_ _`(`_ ParameterList_\u003csub> [?Await,?AsyncParameter]opt\u003c/sub>_ _`)`_ TypeAnnotation_\u003csub> opt\u003c/sub>*\n\n  ParameterList_\u003csub> [Await,AsyncParameter]\u003c/sub> *:_  \n   _RequiredParameterList_\u003csub> [?Await]\u003c/sub>  \n   _OptionalParameterList_\u003csub> [?Await,?AsyncParameter]\u003c/sub>  \n   _RestParameter_\u003csub> [?Await]\u003c/sub>  \n   _RequiredParameterList_\u003csub> [?Await]\u003c/sub> `,` _OptionalParameterList_\u003csub> [?Await,?AsyncParameter]\u003c/sub>  \n   _RequiredParameterList_\u003csub> [?Await]\u003c/sub> `,` _RestParameter_\u003csub> [?Await]\u003c/sub>  \n   _OptionalParameterList_\u003csub> [?Await,?AsyncParameter]\u003c/sub> `,` _RestParameter_\u003csub> [?Await]\u003c/sub>  \n   _RequiredParameterList_\u003csub> [?Await]\u003c/sub> `,` _OptionalParameterList_\u003csub> [?Await,?AsyncParameter]\u003c/sub> `,` _RestParameter_\u003csub> [?Await]\u003c/sub>\n\n  _RequiredParameterList_\u003csub> [Await] \u003c/sub>_:_  \n   _RequiredParameter_\u003csub> [?Await]\u003c/sub>  \n   _RequiredParameterList_\u003csub> [?Await]\u003c/sub> `,` _RequiredParameter_\u003csub> [?Await]\u003c/sub>\n\n  _RequiredParameter_\u003csub> [Await] \u003c/sub>_:_  \n   _AccessibilityModifier_\u003csub> opt\u003c/sub> _BindingIdentifier_\u003csub> [?Await]\u003c/sub> _TypeAnnotation_\u003csub> opt\u003c/sub>  \n   _Identifier_ `:` _StringLiteral_\n\n  _OptionalParameterList_\u003csub> [Await,AsyncParameter] \u003c/sub>_:_  \n   _OptionalParameter_\u003csub> [?Await,?AsyncParameter]\u003c/sub>  \n   _OptionalParameterList_\u003csub> [?Await,?AsyncParameter]\u003c/sub> `,` _OptionalParameter_\u003csub> [?Await,?AsyncParameter]\u003c/sub>\n\n  _OptionalParameter_\u003csub> [Await,AsyncParameter]\u003c/sub>_:_  \n   [+AsyncParameter] _AccessibilityModifier_\u003csub> opt\u003c/sub> _BindingIdentifier_\u003csub> [Await]\u003c/sub> `?` _TypeAnnotation_\u003csub> opt\u003c/sub>  \n   [+AsyncParameter] _AccessibilityModifier_\u003csub> opt\u003c/sub> _BindingIdentifier_\u003csub> [Await]\u003c/sub> _TypeAnnotation_\u003csub> opt\u003c/sub> _Initialiser_\u003csub> [In]\u003c/sub>  \n   [+AsyncParameter] _BindingIdentifier_\u003csub> [Await]\u003c/sub> `?` `:` _StringLiteral_  \n   [~AsyncParameter] _AccessibilityModifier_\u003csub> opt\u003c/sub> _BindingIdentifier_\u003csub> [?Await]\u003c/sub> `?` _TypeAnnotation_\u003csub> opt\u003c/sub>  \n   [~AsyncParameter] _AccessibilityModifier_\u003csub> opt\u003c/sub> _BindingIdentifier_\u003csub> [?Await]\u003c/sub> _TypeAnnotation_\u003csub> opt\u003c/sub> _Initialiser_\u003csub> [In,?Await]\u003c/sub>  \n   [~AsyncParameter] _BindingIdentifier_\u003csub> [?Await]\u003c/sub> `?` `:` _StringLiteral_ \n\n  _RestParameter_\u003csub> [Await]\u003c/sub>_:_  \n   `...` _BindingIdentifier_\u003csub> [?Await]\u003c/sub> _TypeAnnotation_\u003csub> opt\u003c/sub>\n## \u003ca name=\"A.2\"/>A.2 Expressions\n\n  _BindingIdentifier_\u003csub> [Await]\u003c/sub> : ( Modified )  \n   _Identifier_ but not `await`  \n   [~Await] `await`\n\n  _PropertyAssignment_\u003csub> [Await]\u003c/sub> :  \n   _PropertyName_ `:` _AssignmentExpression_\u003csub> [?Await]\u003c/sub>  \n   _PropertyName_ _CallSignature_ `{` _FunctionBody_ `}`  \n   _GetAccessor_  \n   _SetAccessor_  \n   `async` [no _LineTerminator_ here] _PropertyName_ _CallSignature_\u003csub> [Await,AsyncParameter]\u003c/sub> `{` _FunctionBody_\u003csub> [Await]\u003c/sub> `}`\n\n  _GetAccessor_ :  \n   `get` _PropertyName_ `(` `)` _TypeAnnotation\u003csub>opt\u003c/sub>_ `{` _FunctionBody_ `}`  \n   `async` [no _LineTerminator_ here] `get` _PropertyName_ `(` `)` _TypeAnnotation_\u003csub> opt\u003c/sub> `{` _FunctionBody_\u003csub> [Await]\u003c/sub> `}`\n\n  _FunctionExpression_\u003csub> [Await]\u003c/sub> : ( Modified )  \n   `function` _BindingIdentifier_\u003csub> [?Await]opt\u003c/sub> _CallSignature_ `{` _FunctionBody_ `}`  \n   `async` [no _LineTerminator_ here] `function` _BindingIdentifier_\u003csub> [?Await]opt\u003c/sub> _CallSignature_\u003csub> [Await,AsyncParameter]\u003c/sub> `{` _FunctionBody_\u003csub> [Await]\u003c/sub> `}`\n\n  _AssignmentExpression_\u003csub> [Await]\u003c/sub> : ( Modified )  \n   ...  \n   _ArrowFunctionExpression_\u003csub> [?Await]\u003c/sub>\n\n  _ArrowFunctionExpression_\u003csub> [Await]\u003c/sub> :  \n   _ArrowFormalParameters_ `=>` _Block_\u003csub> [?Await]\u003c/sub>  \n   _ArrowFormalParameters_ `=>` _AssignmentExpression_\u003csub> [?Await]\u003c/sub>  \n   `async` [no _LineTerminator_ here] _CallSignature_\u003csub> [Await,AsyncParameter]\u003c/sub> `=>` _Block_\u003csub> [Await]\u003c/sub>  \n   `async` [no _LineTerminator_ here] _CallSignature_\u003csub> [Await,AsyncParameter]\u003c/sub> `=>` _AssignmentExpression_\u003csub> [Await]\u003c/sub>\n\n  _ArrowFormalParameters_\u003csub> [Await]\u003c/sub> :  \n   _CallSignature_  \n   _BindingIdentifier_\u003csub> [?Await]\u003c/sub>\n\n  _UnaryExpression_\u003csub> [Await]\u003c/sub> : ( Modified )  \n   ...  \n   `\u003c` _Type_ `>` _UnaryExpression_\u003csub> [?Await]\u003c/sub>  \n   [+Await] `await` _UnaryExpression_\u003csub> [Await]\u003c/sub>\n## \u003ca name=\"A.3\"/>A.3 Functions\n\n  _FunctionDeclaration_\u003csub> [Await]\u003c/sub> : ( Modified )  \n   _FunctionOverloads_\u003csub> [?Await]opt\u003c/sub> _FunctionImplementation_\u003csub> [?Await]\u003c/sub>\n\n  _FunctionOverloads_\u003csub> [Await]\u003c/sub> :  \n   _FunctionOverloads_\u003csub> [?Await]opt\u003c/sub> _FunctionOverload_\u003csub> [?Await]\u003c/sub>\n\n  _FunctionOverload_\u003csub> [Await]\u003c/sub> :  \n   `function` _BindingIdentifier_\u003csub> [?Await]\u003c/sub> _CallSignature_ `;`\n\n  FunctionImplementation\u003csub> [Await]\u003c/sub> :  \n   `function` _BindingIdentifier_\u003csub> [?Await]\u003c/sub> _CallSignature_ `{` _FunctionBody_ `}`  \n   `async` [no _LineTerminator_ here] `function` _BindingIdentifier_\u003csub> [?Await]\u003c/sub> _CallSignature_\u003csub> [Await,AsyncParameter]\u003c/sub> `{` _FunctionBody_\u003csub> [Await]\u003c/sub> `}`\n## \u003ca name=\"A.4\"/>A.4 Classes\n\n  _MemberFunctionImplementation_:  \n   _AccessibilityModifier_\u003csub>opt\u003c/sub> `static`\u003csub> opt\u003c/sub> _PropertyName_ _CallSignature_ `{` _FunctionBody_ `}`  \n   _AccessibilityModifier_\u003csub>opt\u003c/sub> `static`\u003csub> opt\u003c/sub> `async` [no _LineTerminator_ here] _PropertyName_ _CallSignature_\u003csub> [Await,AsyncParameter]\u003c/sub> `{` _FunctionBody_\u003csub> [Await]\u003c/sub> `}` \n# \u003ca name=\"B\"/>B Helper Functions\n\nThere are two helper functions that are used for _Async Functions_. The `__awaiter` helper function is used by both the ES6 as well as the ES5/ES3 transformations. The `__generator` helper function is used only by the ES5/ES3 transformation.\n## \u003ca name=\"B.1\"/>B.1  `__awaiter`  helper function\n\n``` TypeScript\nvar __awaiter = __awaiter || function (g) {  \n    function n(r, t) {  \n        while (true) {  \n            if (r.done) return r.value;  \n            if (r.value && typeof (t = r.value.then) === \"function\")  \n                return t.call(r.value, function (v) { return n(g.next(v)) }, function (v) { return n(g[\"throw\"](v)) });  \n            r = g.next(r.value);  \n        }  \n    }  \n    return n(g.next());  \n};\n```\n## \u003ca name=\"B.2\"/>B.2  `__generator`  helper function\n\n``` TypeScript\nvar __generator = __generator || function (m) {  \n    var d, i = [], f, g, s = { label: 0 }, y, b;  \n    function n(c) {  \n        if (f) throw new TypeError(\"Generator is already executing.\");  \n        switch (d && c[0]) {  \n            case 0 /*next*/: return { value: void 0, done: true };  \n            case 1 /*throw*/: throw c[1];  \n            case 2 /*return*/: return { value: c[1], done: true };  \n        }  \n        while (true) {  \n            f = false;  \n            switch (!(g = s.trys && s.trys.length && s.trys[s.trys.length - 1]) && c[0]) {  \n                case 1 /*throw*/: i.length = 0; d = true; throw c[1];  \n                case 2 /*return*/: i.length = 0; d = true; return { value: c[1], done: true };  \n            }  \n            try {  \n                if (y) {  \n                    f = true;  \n                    if (typeof (b = y[c[0]]) === \"function\") {  \n                        b = b.call(y, c[1]);  \n                        if (!b.done) return b;  \n                        c[0] = 0 /*next*/, c[1] = b.value;  \n                    }  \n                    y = undefined;  \n                    f = false;  \n                }  \n                switch (c[0]) {  \n                    case 0 /*next*/: s.sent = c[1]; break;  \n                    case 3 /*yield*/: s.label++; return { value: c[1], done: false };  \n                    case 4 /*yield**/: s.label++; y = c[1]; c[0] = 0 /*next*/; c[1] = void 0; continue;  \n                    case 6 /*endfinally*/: c = i.pop(); continue;  \n                    default:  \n                        if (c[0] === 1 /*throw*/ && s.label \u003c g[1]) { s.error = c[1]; s.label = g[1]; break; }  \n                        if (c[0] === 5 /*break*/ && (!g || (c[1] >= g[0] && c[1] \u003c g[3]))) { s.label = c[1]; break; }  \n                        s.trys.pop();  \n                        if (g[2]) { i.push(c); s.label = g[2]; break; }  \n                        continue;  \n                }  \n                f = true;  \n                c = m(s);  \n            } catch (e) {  \n                y = void 0;  \n                c[0] = 1 /*throw*/, c[1] = e;  \n            }  \n        }  \n    }  \n    return {  \n        next: function (v) { return n([0 /*next*/, v]); },  \n        1 /*throw*/: function (v) { return n([1 /*throw*/, v]); },  \n        2 /*return*/: function (v) { return n([2 /*return*/, v]); },  \n    };  \n};\n```\n### \u003ca name=\"B.2.1\"/>B.2.1 `_generator`  Arguments\n\n| argument | description |\n| --- | --- |\n| `m` | State machine function. |\n### \u003ca name=\"B.2.2\"/>B.2.2  `n`  Arguments\n\n| argument | description |\n| --- | --- |\n| `c` | The current instruction. |\n### \u003ca name=\"B.2.3\"/>B.2.3 Variables\n\n| variable | description |\n| --- | --- |\n| `d` | A value indicating whether the generator is done executing. |\n| `i` | A stack of instructions (see below) pending execution. |\n| `f` | A value indicating whether the generator is executing, to prevent reentry (per ES6 spec). |\n| `g` | The region at the top of the `s.trys` stack. |\n| `s` | State information for the state machine function. |\n| `s.label` | The label for the next instruction. |\n| `s.trys` | An optional stack of protected regions for `try..catch..finally` blocks. |\n| `s.sent` | A value sent to the generator when calling `next`. |\n| `s.error` | An error caught by a `catch` clause. |\n| `y` | The current inner generator to which to delegate generator instructions. |\n| `b` | The method on `n` to execute for the current instruction. One of `\"next\"`, `\"throw\"`, or `\"return\"`. |\n### \u003ca name=\"B.2.4\"/>B.2.4 Instructions\n\n| instruction | args | description |\n| --- | :-: | --- |\n| `0 /*next*/` | 0-1 | Begin or resume processing with an optional sent value. |\n| `1 /*throw*/` | 1 | Throw an exception at the current instruction. Executes any enclosing `catch` or `finally` blocks. |\n| `2 /*return*/` | 0-1 | Returns a value from the current instruction. Executes any enclosing `finally` blocks. |\n| `3 /*yield*/` | 0-1 | Suspends execution and yields an optional value to the caller of the generator. |\n| `4 /*yield**/` | 1 | Delegates generator operations to the provided iterable (not needed for _Async Functions_, but provided for future support for down-level _Generator Functions_). |\n| `5 /*break*/` | 1 | Jumps to a labeled instruction. Executes any enclosing `finally` blocks if the target is outside of the current protected region. |\n| `6 /*endfinally*/` | 0 | Marks the end of a `finally` block so that the previous `break`, `throw`, or `return` instruction can be processed. |\n### \u003ca name=\"B.2.5\"/>B.2.5 Protected Regions\n\nA protected region marks the beginning and end of a `try..catch` or `try..finally` block. Protected regions are pushed onto the `s.trys` stack whenever a protected region is entered when executing the state machine. A protected region is defined using a quadruple in the following format:\n\n| field | required | description |\n| --- | --- | --- |\n| 0 | yes | The start of a `try` block. |\n| 1 | no | The start of a `catch` block. |\n| 2 | no | The start of a `finally` block. |\n| 3 | yes | The end of a `try..catch..finally` block. |\n## \u003ca name=\"B.3\"/>B.3 `__generator` helper function (alternate)\n\n``` TypeScript\nvar __generator = __generator || function (body) {  \n    var done, instructions = [], stepping, region, state = { label: 0 }, delegated;  \n    function step(instruction) {  \n        if (stepping) throw new TypeError(\"Generator is already executing.\");  \n        if (done) {  \n            switch (instruction[0]) {  \n                case 0 /*next*/: return { value: void 0, done: true };  \n                case 1 /*throw*/: throw instruction[1];  \n                case 2 /*return*/: return { value: instruction[1], done: true };  \n            }  \n        }  \n        while (true) {  \n            stepping = false;  \n            var region = state.trys && state.trys.length && state.trys[state.trys.length - 1];  \n            if (region) {  \n                switch (instruction[0]) {  \n                    case 1 /*throw*/:  \n                        instructions.length = 0;  \n                        done = true;  \n                        throw instruction[1];  \n                    case 2 /*return*/:  \n                        instructions.length = 0;  \n                        done = true;  \n                        return { value: instruction[1], done: true };  \n                }  \n            }  \n            try {  \n                if (delegated) {  \n                    stepping = true;  \n                    var callback = delegated[instruction[0]];  \n                    if (typeof callback === \"function\") {  \n                        var result = callback.call(delegated, instruction[1]);  \n                        if (!result.done) return result;  \n                        instruction[0] = 0 /*next*/;  \n                        instruction[1] = result.value;  \n                    }  \n                    delegated = undefined;  \n                    stepping = false;  \n                }  \n                switch (instruction[0]) {  \n                    case 3 /*yield*/:  \n                        state.label++;  \n                        return { value: instruction[1], done: false };  \n                    case 4 /*yield**/:  \n                        state.label++;  \n                        delegated = instruction[1];  \n                        instruction[0] = 0 /*next*/;  \n                        instruction[1] = void 0;  \n                        continue;  \n                    case 0 /*next*/:  \n                        state.sent = instruction[1];  \n                        break;  \n                    case 6 /*endfinally*/:  \n                        instruction = instructions.pop();  \n                        continue;  \n                    default:  \n                        if (instruction[0] === 5 /*break*/ && (!region || (instruction[1] >= region[0] && instruction[1] \u003c region[3]))) {  \n                            state.label = instruction[1];  \n                            break;  \n                        }  \n                        if (instruction[0] === 1 /*throw*/ && state.label \u003c region[1]) {  \n                            state.error = instruction[1];  \n                            state.label = region[1];  \n                            break;  \n                        }  \n                        state.trys.pop();  \n                        if (region[2]) {  \n                            instructions.push(instruction);  \n                            state.label = region[2];  \n                            break;  \n                        }  \n                        continue;  \n                }  \n                stepping = true;  \n                instruction = body(state);  \n            } catch (e) {  \n                delegated = void 0;  \n                instruction[0] = 1 /*throw*/, instruction[1] = e;  \n            }  \n        }  \n    }  \n    return {  \n        next: function (v) { return step([0 /*next*/, v]); },  \n        \"throw\": function (v) { return step([1 /*throw*/, v]); },  \n        \"return\": function (v) { return step([2 /*return*/, v]); },  \n    };  \n};\n```\n","author":{"url":"https://github.com/rbuckton","@type":"Person","name":"rbuckton"},"datePublished":"2015-01-14T02:25:40Z","url":"https://github.com/microsoft/TypeScript/issues/1664"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4b12c415-04d5-0e2a-6ec0-0972c7a4fdb6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9956:269AD9:F79AD1:14B8B83:6B010EF5
html-safe-noncec09eedc81282ee1cec7281a3ae32582634cae43c5508bd3ed8054205155b7781
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTU2OjI2OUFEOTpGNzlBRDE6MTRCOEI4Mzo2QjAxMEVGNSIsInZpc2l0b3JfaWQiOiI2ODEzMzI3NzM2OTQ2MzY0MTQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac854044e8ccf9c52def50fbf30c65d57bcdad44e9829750803e498bced18c2d0a
hovercard-subject-tagissue:54276542
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/1664/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c84a33a7e7afa2b525f7df4cb20e4df8cc6aa2e7ca1eba7609e22da2bc0fc27a/microsoft/TypeScript/issues/1664
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c84a33a7e7afa2b525f7df4cb20e4df8cc6aa2e7ca1eba7609e22da2bc0fc27a/microsoft/TypeScript/issues/1664
og:image:altAsync Functions 1 Async Functions This is a spec proposal for the addition of Async Functions (also known as async..await) as a feature of TypeScript. 2 Use Cases Async Functions allow TypeScript d...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerbuckton
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/1664#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F1664
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F1664
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/1664
Reloadhttps://github.com/microsoft/TypeScript/issues/1664
Reloadhttps://github.com/microsoft/TypeScript/issues/1664
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests310 (310)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/1664
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/1664
Proposal: Async Functionshttps://github.com/microsoft/TypeScript/issues/1664#top
https://github.com/rbuckton
CommittedThe team has roadmapped this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Committed%22
ES NextNew featurers for ECMAScript (a.k.a. ESNext)https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22ES%20Next%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com/rbuckton
Ron Buckton (rbuckton)https://github.com/rbuckton
on Jan 14, 2015https://github.com/microsoft/TypeScript/issues/1664#issue-54276542
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objectshttp://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects
http://msdn.microsoft.com/en-us/library/windows/apps/br211867.aspxhttp://msdn.microsoft.com/en-us/library/windows/apps/br211867.aspx
https://github.com/kriskowal/qhttps://github.com/kriskowal/q
https://github.com/tildeio/rsvp.js/https://github.com/tildeio/rsvp.js/
https://github.com/petkaantonov/bluebirdhttps://github.com/petkaantonov/bluebird
https://github.com/jakearchibald/es6-promisehttps://github.com/jakearchibald/es6-promise
https://github.com/calvinmetcalf/liehttps://github.com/calvinmetcalf/lie
https://github.com/cujojs/whenhttps://github.com/cujojs/when
https://github.com/rbuckton/asyncjshttps://github.com/rbuckton/asyncjs
Nexthttps://github.com/microsoft/TypeScript/issues/1664?timeline_page=1
Ron Buckton (rbuckton)https://github.com/rbuckton
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
SpecIssues related to the TypeScript language specificationhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Spec%22
on Jan 14, 2015https://github.com/microsoft/TypeScript/issues/1664#event-218515502
Ron Buckton (rbuckton)https://github.com/rbuckton
Sophia J. Turner (sophiajt)https://github.com/sophiajt
on Jan 14, 2015https://github.com/microsoft/TypeScript/issues/1664#event-218515507
Ron Buckton (rbuckton)https://github.com/rbuckton
on Jan 14, 2015https://github.com/microsoft/TypeScript/issues/1664#event-218515774
https://github.com/MgSam
Sam (MgSam)https://github.com/MgSam
on Jan 14, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-69969551
https://github.com/rbuckton
Ron Buckton (rbuckton)https://github.com/rbuckton
on Jan 14, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70016278
https://github.com/csnover
Colin Snover (csnover)https://github.com/csnover
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70026366
https://github.com/bgever
Bart Verkoeijen (bgever)https://github.com/bgever
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70042343
https://github.com/rbuckton
Ron Buckton (rbuckton)https://github.com/rbuckton
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70043000
Bart Verkoeijen (@bgever)https://github.com/bgever
https://github.com/bgever
Bart Verkoeijen (bgever)https://github.com/bgever
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70045948
https://github.com/johnnyreilly
John Reilly (johnnyreilly)https://github.com/johnnyreilly
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70048382
Colin Snover (@csnover)https://github.com/csnover
https://github.com/rbuckton
Ron Buckton (rbuckton)https://github.com/rbuckton
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70051396
Bart Verkoeijen (@bgever)https://github.com/bgever
https://github.com/Steve-Fenton
Steve Fenton (Steve-Fenton)https://github.com/Steve-Fenton
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70056578
https://github.com/bgever
Bart Verkoeijen (bgever)https://github.com/bgever
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70058694
Ron Buckton (@rbuckton)https://github.com/rbuckton
https://github.com/fletchsod-developer
fletchsod-developerhttps://github.com/fletchsod-developer
on Jan 15, 2015https://github.com/microsoft/TypeScript/issues/1664#issuecomment-70148593
http://www.joezimjs.com/javascript/synchronizing-asynchronous-javascript-es7/http://www.joezimjs.com/javascript/synchronizing-asynchronous-javascript-es7/
http://jakearchibald.com/2014/es7-async-functions/http://jakearchibald.com/2014/es7-async-functions/
https://github.com/wiktor-k
Wiktor Kwapisiewicz (wiktor-k)https://github.com/wiktor-k
on Sep 9, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-245870015
https://gist.github.com/wiktor-k/eed3ef8032f73caba33d4fd1ddd16308https://gist.github.com/wiktor-k/eed3ef8032f73caba33d4fd1ddd16308
knedenhttps://github.com/marten-de-vries/kneden#example
https://github.com/jods4
jods (jods4)https://github.com/jods4
on Sep 9, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-245975014
Wiktor Kwapisiewicz (@wiktor-k)https://github.com/wiktor-k
https://github.com/MatAtBread
Matt (MatAtBread)https://github.com/MatAtBread
on Sep 9, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-245978744
https://github.com/MatAtBread/nodenthttps://github.com/MatAtBread/nodent
https://github.com/jods4
jods (jods4)https://github.com/jods4
on Sep 9, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-245991603
Matt (@MatAtBread)https://github.com/MatAtBread
https://github.com/MatAtBread
Matt (MatAtBread)https://github.com/MatAtBread
on Sep 9, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-245994030
MatAtBread/fast-async#11https://github.com/MatAtBread/fast-async/issues/11
https://github.com/MatAtBread
Matt (MatAtBread)https://github.com/MatAtBread
on Sep 9, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-245994955
https://github.com/matAtWork
Matt W (matAtWork)https://github.com/matAtWork
on Sep 26, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-249639699
jods (@jods4)https://github.com/jods4
http://nodent.mailed.me.uk/#%2F*%20Aync%20addition%20*%2F%0Aasync%20function%20add(a%2C%20b)%20%7B%0A%20%20%20%20return%20a%20%2B%20b%3B%0A%7D%0A%0A%2F*%20Run%20the%20async%20addition%20lots%20of%20times%20*%2F%0Aasync%20function%20test()%20%7B%0A%20%20%20%20var%20x%20%3D%200%3B%0A%20%20%20%20for%20(var%20n%20%3D%200%3B%20n%20%3C%205e5%3B%20n%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20x%20%3D%20await%20add(x%2C%201)%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20n%20-%20x%3B%0A%7D%0A%0Aasync%20function%20run()%20%7B%0A%20%20%20%20var%20t%20%3D%20Date.now()%3B%0A%20%20%20%20await%20test()%3B%0A%20%20%20%20return%20Date.now()%20-%20t%3B%0A%7D%0A%0A%2F*%20Run%20the%20test%2C%20in%20a%20Generator%20friendly%20way%20from%20non-async%20code.%20*%2F%0Arun().then(log)%3B%0Ahttp://nodent.mailed.me.uk/#%2F*%20Aync%20addition%20*%2F%0Aasync%20function%20add(a%2C%20b)%20%7B%0A%20%20%20%20return%20a%20%2B%20b%3B%0A%7D%0A%0A%2F*%20Run%20the%20async%20addition%20lots%20of%20times%20*%2F%0Aasync%20function%20test()%20%7B%0A%20%20%20%20var%20x%20%3D%200%3B%0A%20%20%20%20for%20(var%20n%20%3D%200%3B%20n%20%3C%205e5%3B%20n%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20x%20%3D%20await%20add(x%2C%201)%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20n%20-%20x%3B%0A%7D%0A%0Aasync%20function%20run()%20%7B%0A%20%20%20%20var%20t%20%3D%20Date.now()%3B%0A%20%20%20%20await%20test()%3B%0A%20%20%20%20return%20Date.now()%20-%20t%3B%0A%7D%0A%0A%2F*%20Run%20the%20test%2C%20in%20a%20Generator%20friendly%20way%20from%20non-async%20code.%20*%2F%0Arun().then(log)%3B%0A
https://github.com/jods4
jods (jods4)https://github.com/jods4
on Sep 26, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-249701081
Matt W (@matAtWork)https://github.com/matAtWork
https://github.com/matAtWork
Matt W (matAtWork)https://github.com/matAtWork
on Sep 26, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-249710739
https://github.com/JohnGalt1717
James Hancock (JohnGalt1717)https://github.com/JohnGalt1717
on Dec 8, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-265768683
https://github.com/bman654
Brandon Wallace (bman654)https://github.com/bman654
on Dec 8, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-265768996
…https://github.com/microsoft/TypeScript/issues/1664
#1664 (comment)https://github.com/microsoft/TypeScript/issues/1664#issuecomment-265768683
https://github.com/notifications/unsubscribe-auth/AAhETMg1gVWQ9Amq2PARpYv_Pmlsq07Gks5rGCLUgaJpZM4DSFLMhttps://github.com/notifications/unsubscribe-auth/AAhETMg1gVWQ9Amq2PARpYv_Pmlsq07Gks5rGCLUgaJpZM4DSFLM
@bman654https://github.com/bman654
https://github.com/jamiewinder
Jamie Winder (jamiewinder)https://github.com/jamiewinder
on Dec 8, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-265770363
https://github.com/JohnGalt1717
James Hancock (JohnGalt1717)https://github.com/JohnGalt1717
on Dec 8, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-265772181
https://github.com/RReverser
Ingvar Stepanyan (RReverser)https://github.com/RReverser
on Dec 8, 2016https://github.com/microsoft/TypeScript/issues/1664#issuecomment-265806204
James Hancock (@JohnGalt1717)https://github.com/JohnGalt1717
microsofthttps://github.com/microsoft
on Jun 18, 2018https://github.com/microsoft/TypeScript/issues/1664#event-1686918363
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/1664
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/1664
Ron Buckton (rbuckton)https://github.com/rbuckton
CommittedThe team has roadmapped this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Committed%22
ES NextNew featurers for ECMAScript (a.k.a. ESNext)https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22ES%20Next%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.