2 ms·
TypeScript accommodates async/await in <ES2017 environments.
by ihsw2 9y ago
TypeScript accommodates async/await in <ES2017 environments.
- joshribakoff 9y agoTypescript is a language that compiles to es5. Your comment makes it sound like typescript somehow makes an old runtime support new features. You can actually use any transpiler to produce older JavaScript, this is not unique to typescript, and you're shipping es5 code at the end of the day which has tradeoffs to consider
- ihsw2 9y agoMy comment was clear, anyone investigating the subject can confirm that polyfills are used to "make" an old runtime support new features (eg: using generators for feature-complete async/await on ES6, using a custom state-machine for feature-complete async/await on ES5/ES3).