Transpilation versus compilation 

Developers can usually define what compilation is, within the context of programming. The definition would be something like this: compilation is the process of transforming source code, by putting it through another program known as a compiler, into machine-readable code. This resultant code is typically referred to as assembly code, which is a set of machine instructions native to the machine's CPU, which the code is meant to be run on.

 Transpilation, on the other hand, is the process of transforming source code written in one language into equivalent code in another (or target) language. While this definition is good enough for discussion, for it to be fully accurate we have to also note that the source and target languages may, in fact, be different versions (or releases) of the same language. For our transpilation needs, we'll be using TypeScript's transpiler, tsc, which comes packaged with TypeScript. The reason we care about transpilation when building Angular applications is because we will be writing our code in TypeScript. However, web browsers only have JavaScript engines/interpreters, and so we need a way to transpile it into JavaScript.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.106.233