In NS 3.x is Javascript async/await supported - used to work in NS 2.x.
In code, I've got something like:
private async onTapBounce( )
{
//await my_func();
}
Looking at the JS code
ToyModel.prototype._onTapBounce = function (label) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/];
});
});
};
I'm getting undefined ____awaiter at runtime.
Hi @erjdriver,
Thank you for contacting us.
About your request, I make a little research and found that async/await should be supported in NativeScript. For further help and more info how to use it, you could review the article here.
Another option to be able to use async/await is to open your project tsconfig.json file and to set noEmitHelpers to false.
Hope this helps.
Thank you - it does.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi @erjdriver,
Thank you for contacting us.
About your request, I make a little research and found that async/await should be supported in NativeScript. For further help and more info how to use it, you could review the article here.
Another option to be able to use async/await is to open your project
tsconfig.jsonfile and to setnoEmitHelperstofalse.Hope this helps.