- TypeScript Essentials
- Christopher Nance
- 320字
- 2021-08-05 17:43:25
Setting up the IDE
To start writing code in TypeScript, we first need to install the compiler. The compiler is available as a standalone package through Node.js, Visual Studio tooling that Microsoft provides, or you can directly download the compiler's source code. Throughout this text we will be using Visual Studio 2013 as our interactive development environment (IDE). Visual Studio 2013 provides native support for TypeScript with the release of Update 2. For Visual Studio 2012, Microsoft provides an extension that can be installed from the TypeScript home page ( number of code editors that have support for it has grown including Eclipse (http://www.jetbrains.com/webstorm/) and Notepad++ (https://github.com/hansrwindhoff/nppPluginTypescript).
The TypeScript compiler, as with a number of modern languages, is written in TypeScript, which means it will compile to plain JavaScript and run in any JavaScript host. With Microsoft's tools installed, you can access the TypeScript compiler directly from the command line and generate JavaScript immediately. The following screenshot shows a list of the available compiler options and what they do. We will look at each of these options more thoroughly later on but for now you can see that the compiler, although very new, already has a very robust feature set

As you can see the list of options is fairly extensive so far and will undoubtedly become richer as the language develops. TypeScript 1.0, which will be the version of the language used in this text, provides parameters for everything from specifying the output file to warnings based on code rules. We will discuss all of these options later on, but for now all you need to know is that you can compile your TypeScript code by passing the compiler the path of the file you want to compile. When we begin to build more complicated applications the Visual Studio integrations will provide an easy way for you to set compiler options for all TypeScript files included in your projects.
- Java程序設計(慕課版)
- ASP.NET MVC4框架揭秘
- 云計算通俗講義(第3版)
- HTML5 and CSS3 Transition,Transformation,and Animation
- Java程序設計:原理與范例
- WebRTC技術詳解:從0到1構建多人視頻會議系統
- Linux Device Drivers Development
- Scratch趣味編程:陪孩子像搭積木一樣學編程
- Unity 2017 Game AI Programming(Third Edition)
- ASP.NET 4.0 Web程序設計
- Java多線程并發體系實戰(微課視頻版)
- Python深度學習(第2版)
- PHP 7 Programming Blueprints
- Puppet Cookbook(Third Edition)
- MATLAB/Simulink建模與仿真