Compiling vs Transpiling

前端 未结 4 1450
情书的邮戳
情书的邮戳 2020-12-07 12:57

While searching about the difference, I came across these definitions:

Compiling is the general term for taking source code written in one language

4条回答
  •  天命终不由人
    2020-12-07 13:35

    Ex: TypeScript ( a Microsoft superset of JavaScript with type safe checking) transpiles to JavaScript code which can run on different types of browsers.

    https://en.wikipedia.org/wiki/Microsoft_TypeScript "Microsoft TypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language.

    TypeScript is designed for development of large applications and transcompiles to JavaScript.[5] As TypeScript is a superset of JavaScript, existing JavaScript programs are also valid TypeScript programs. TypeScript may be used to develop JavaScript applications for both client-side and server-side (Node.js) execution."

提交回复
热议问题