Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does TypeScript have a dedicated VM, or is it compile-to-js only?

Tags:

typescript

If not, any plans to deliver a server-side and/or browser-embedded VM?

like image 200
John Evans Avatar asked Oct 01 '12 18:10

John Evans


People also ask

Does TypeScript have a compiler?

Compiler. The TypeScript compiler, named tsc , is written in TypeScript. As a result, it can be compiled into regular JavaScript and can then be executed in any JavaScript engine (e.g. a browser).

Can I use TypeScript instead of JavaScript?

TypeScript is a superset of typed JavaScript (optional) that can help build and manage large-scale JavaScript projects. It can be considered JavaScript with additional features like strong static typing, compilation, and object-oriented programming.

Can you use TypeScript and JavaScript together?

The TypeScript compiler supports a mix of JavaScript and TypeScript files if we use the compiler option --allowJs : TypeScript files are compiled. JavaScript files are simply copied over to the output directory (after a few simple type checks).

Is TypeScript better than JavaScript?

Advantages of using TypeScript over JavaScriptTypeScript always points out the compilation errors at the time of development (pre-compilation). Because of this getting runtime errors is less likely, whereas JavaScript is an interpreted language. TypeScript supports static/strong typing.


1 Answers

Nope - There's no dedicated VM, and no plan to develop one, either. The goal of TypeScript is to help us all build better JS applications, regardless of where they run. As JS VMs improve, we improve as well :)

like image 147
Joe Pamer Avatar answered Oct 18 '22 15:10

Joe Pamer