Why TypeScript transpiling is not compiling? I think it is a very confusing topic for everyone so I am going to explain the difference between the two.
Despite the actual fact that the term “transpiling” has been around since last century, there seems to be a good bit of confusion regarding what it suggests and what the distinction is between transpiling and compiling.
Firstly, transpiling could be a specific quite compiling. This helps an excellent deal as we have a tendency to apprehend we have a tendency to square measure talk regarding identical quite issues. It is truly a selected quit compiling. Thus, however, can we outline it compared to a lot of general terms?
Compiling
Is the general term for taking source code written in one language and transforming into another.
Transpiling
Is a specific term for taking source code written in one language and transforming into another language that features a similar level of abstraction.
So (simplistically) after you compile C#, your methodology bodies square measure reworked by the compiler into IL. This can't be referred to as transpiring as a result of the 2 languages square measure terribly totally different levels of abstraction.
When you compile matter, it's transformed by the compiler into JavaScript. These square measure terribly similar levels of abstraction, thus you may decide this transpiring.
Both compilers and transpilers will optimize the code as a part of the method.
Other common combos that may be dubbed as transpiling embody C++ to C, CoffeeScript to JavaScript, Dart to JavaScript and PHP to C++.