You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior:
It throws this stacktrace on console:
(node:30260) UnhandledPromiseRejectionWarning: ReferenceError: _superIndex is not defined
at Object.<anonymous> (/home/gabriel/Documents/test_ts_bug/test.js:29:25)
at Generator.next (<anonymous>)
at /home/gabriel/Documents/test_ts_bug/test.js:12:71
at new Promise (<anonymous>)
at __awaiter (/home/gabriel/Documents/test_ts_bug/test.js:8:12)
at emitter.on (/home/gabriel/Documents/test_ts_bug/test.js:28:43)
at Emitter.on (/home/gabriel/Documents/test_ts_bug/test.js:16:14)
at Object.<anonymous> (/home/gabriel/Documents/test_ts_bug/test.js:28:34)
at Generator.next (<anonymous>)
at /home/gabriel/Documents/test_ts_bug/test.js:12:71
Looking at the source code, the compiler isn't generating the _superIndex arrow function.
Changing the code of the onInit() function, it corrects the issue:
TypeScript Version: 3.4.0-dev.20190223
Search Terms: Async, Await, Decorator, _superIndex
Code
Build command line:
Expected behavior:
Print on the console:
Note: It is working on TS 2.9.2.
Actual behavior:
It throws this stacktrace on console:
Looking at the source code, the compiler isn't generating the
_superIndex
arrow function.Changing the code of the
onInit()
function, it corrects the issue:Playground Link: Not reproducible on the playground, because it just throws when compiling to ES6.
Related Issues: Did not found other similar bug. Maybe related to #26707?
The text was updated successfully, but these errors were encountered: