4 ms·
TypeScript does NOT shim async functions[1] for you, or give you fetch-api[2]? AFAIK, if you want that functionality, you still need babel and the fills/transf
by tracker1 7y ago
TypeScript does NOT shim async functions[1] for you, or give you fetch-api[2]? AFAIK, if you want that functionality, you still need babel and the fills/transforms to support async in browsers without it are freakishly huge payloads. That doesn't count dynamic imports and a number of other features that TypeScript doesn't support.
I'd rather not support a dead browser, that's been dead for years now, that has clear replacements and alternatives. Not to mention security concerns above and beyond development pain..
[1] https://caniuse.com/#feat=async-functions
[2] https://caniuse.com/#feat=fetch
- DaiPlusPlus 7y agoTypeScript does shim async functions, you just need to supply your own `Promise<T>` polyfill ( https://mariusschulz.com/blog/compiling-async-await-to-es3-es5-in-typescript https://mariusschulz.com/blog/compiling-async-await-to-es3-e... ). `fetch` also works fine with a third-party polyfill. Combined, that's about 30KiB extra compared to pure ES6 (before GZip).
- tracker1 7y agoThank you for pointing this out... I just know I've come across quite a few features of EScurrent/next that weren't supported in typescript and found the experience a bit irritating to do both babel and ts (and webpack).