ASP. net mvc (3) TypeScript, mvctypescript

Source: Internet
Author: User

ASP. net mvc (3) TypeScript, mvctypescript

TypeScript is a JavaScript superset developed by Microsoft. It is compatible with JavaScript and can load and run JavaScript code. Compared with JavaScript, TypeScript adds comments so that the compiler can understand the supported objects and functions. The compiler removes comments without increasing the overhead. It also adds a complete class structure, it is a traditional object-oriented language.

Why is there TypeScript?

JavaScript is just a scripting language, not designed for developing large Web applications. JavaScript does not provide classes and modules, and TypeScript extends JavaScript to implement these features. The main features of TypeScript include:

  • TypeScript is an open-source language released by Microsoft. It uses the Apache authorization protocol.
  • TypeScript is a JavaScript superset.
  • TypeScript adds optional types, classes, and modules.
  • TypeScript can be translated into readable, standard JavaScript
  • TypeScript supports the development of large-scale JavaScript applications
  • TypeScript is designed to develop large-scale applications and ensure the compatibility of compiled JavaScript code.
  • TypeScript extends the JavaScript syntax, so the existing JavaScript code can be directly run with TypeScript without changing
  • The TypeScript file extension is ts, while the TypeScript compiler will compile and translate the file into js files.
  • The TypeScript syntax is the same as that of JScript. NET.
  • TypeScript is easy to learn and understand
Syntax features
  • Class Classes
  • Interface Interfaces
  • Module Modules
  • Type annotation Type annotations
  • Compile-time type check Compile time type checking
  • Arrow function (similar to the Lambda expression of C)
The difference between TypeScript in JavaScript TypeScript is a JavaScript superset that extends the JavaScript syntax. Therefore, the existing JavaScript code can work with TypeScript without any modification, typeScript provides the static type check during compilation through the type annotation. TypeScript can process existing JavaScript code and compile only the TypeScript code. The Editor supports Visual Studio 2013 and supports TypeScript module/syntax highlighting. You need to install the TypeScript plug-in. Similar to Sublime Text, the Vim and Emacs editor supports syntax highlighting. The VS 2013 editor also provides refactoring and Go To Definition functions.

 

Note: TypeScript does not rely on any IDE. You can compile TypeScript into JavaScript in any application.

How to obtain TypeScript 1.5 for Visual Studio 2013

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.