Hello, I am trying to implement an asynchronous pi...
# suitecommerce
h
Hello, I am trying to implement an asynchronous piece of code using "async await". But the Suitecommerce documentation states use of ECMASCRIPT 5.1 which does not contain the async await keywords. They were introduced in ECMASCRIPT 2017. https://developers.suitecommerce.com/getting-started.html My implementation is working as expected. Is its use encouraged or discouraged? We are using SuiteCommerce 2020.2.7 and the latest Extension Developer Tools
s
It will cause issues for users who use Internet Explorer 11, which is in our list of supported browsers. We can't force you to support IE11 on your site -- if your business is happy to lose a not insignificant number of customers then that's up to you.
(And we use jQuery.Deferred for asynchronous operations.)
👍 1
Oh and if you experience issues with a more modern version ECMAScript than we support, we might not be able to troubleshoot any cases/issues you raise as, as I said, we don't support it.
h
@Steve Goldberg That was helpful. Thanks for the response.
d
TypeScript will rewrite async/await if your target is ES5
s
Alas TypeScript is not supported in extensions
d
Ah you're right. Sorry. My setup dumps my typescript project as a require module into the workspace extension folder.
As a workaround.
s
👨🏻‍💻