I would like to know what a transpiler is and what it actually does?
-
1https://en.wikipedia.org/wiki/Transpiler – Bergi Jan 24 '18 at 05:03
-
They read CoffeeScript, TypeScript, and ES2015, and spit out JavaScript guaranteed to work anywhere – saw303 Jan 24 '18 at 08:08
2 Answers
it is source-to-source compilers, are tools that read source code written in one programming language, and produce the equivalent code in another language.
Languages you write that transpile to JavaScript are often called compile-to-JS languages, and are said to target JavaScript.
They read CoffeeScript, TypeScript, and ES2015, and spit out JavaScript guaranteed to work anywhere
Try to read this link it is good

- 8,051
- 7
- 50
- 90

- 4,607
- 2
- 15
- 36
-
Languages only "target" JavaScript when they were specifically be designed to be compiled to JS. – Bergi Jan 24 '18 at 05:05
-
@Bergi—better tell the people at Babel, the answer is a quote without attribution. ;-) – RobG Jan 24 '18 at 05:18
-
1Please don't just quote other resources, and if you do, provide attribution. If all you have is a link, post it as a comment. – RobG Jan 24 '18 at 05:20
-
Transpiler is a source to source compiler which converts code of one programming language to another programming language.Eventually we can defined the compiler which offer us target source code. for example: if we talk about angular(specifically angular 6) which supports typescript but browser doesn't support hence transpiler comes into picture which convert typescript to javascript which can be understood by browser.

- 11