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
Actually, we are transpiling and generating helpers with TypeScript.
Nowdays, the state of the art is to split linting, type checking, transpilation and bundling into different tools/steps. Here we are mixing type-checking and transpilation.
1.1. This is important because the used JS engine, jerryscript, supports not just full ECMAScript 5.1, but also some interesting features of ES2015 (you can se them listed in the release notes).
By using Babel to transform the code, we can customize which transformations we want, and skip the ones that JerryScript 2.1 already handles natively.
So to do this, we'd want to change our toolchain such that TypeScript is acting only as a typechecker. We'd then want to enable the plugins in Babel such that it can not choke on TypeScript code as an input, and do all the transpilation.
Once that's done and we're copying what's currently happening, we could start turning off Babel plugins one by one as we determine they're not needed based on the JerryScript features we have on device in order to reduce code size by avoiding transpiling features that are actually supported on device.
1.1. This is important because the used JS engine, jerryscript, supports not just full ECMAScript 5.1, but also some interesting features of ES2015 (you can se them listed in the release notes).
By using Babel to transform the code, we can customize which transformations we want, and skip the ones that JerryScript 2.1 already handles natively.
JerryScript support of ES2015 features
Use Babel + JerryScript following https://github.com/jerryscript-project/jerryscript/tree/v2.1.0/tools/babel
The text was updated successfully, but these errors were encountered: