dir.by  
  Поиск  
Компьютер, программы
TypeScript - programming language similar to JavaScript. TypeScript uses types, classes, inheritance. TypeScript converted to JavaScript
 How to download, install TypeScript ? How to check what is installed TypeScript and which version? 
посмотрели 11495 раз
обновлено: 2 March 2020
How to check what is installed TypeScript and which version?
To check what is installed TypeScript you need to enter [konec_stroki] at the command prompt: tsc -v

  Command Prompt (Win Console)  
tsc -v


On the screen we will see the version installed TypeScript

  Command Prompt (Win Console)  
> tsc -v
> Version 1.0.3.0


Note!
It happens that the command does not work tsc , but TypeScript your computer is installed.
So, look for tsc.exe
If found it means you have installed TypeScript.

Run at a command prompt to find out the version TypeScript.
  Command Prompt (Win Console)  
"C:/Program Files (x86)/Microsoft SDKs/TypeScript/3.1/tsc.exe" -v
How to update to the latest version TypeScript
Type at the command prompt: npm update -g typescript

  Command Prompt (Win Console)  
npm update -g typescript
How to download, install TypeScript ?
Method 1. Use Package Manager npm in the node.js

Install Node.js
after installation run at a command prompt: npm install -g typescript

  Command Prompt (Win Console)  
npm install -g typescript

или
  Command Prompt (Win Console)  
npm install -g typescript@latest


Method 2. Install Visual Studio 2017

During installation Visual Studio 2017 put the option:
Node.js development
then all the tools for working with TypeScript
Compilation TypeScript in to JavaScript
To convert .ts file into .js file
you need to run in the command line: tsc file1.ts

  Command Prompt (Win Console)  
tsc file1.ts


file1.ts is the name of the file.
The file name can be anything.


Note!
It happens that the command does not work tsc , but TypeScript your computer is installed.
So, look for tsc.exe
If found it means you have installed TypeScript.

Run at a command prompt
  Command Prompt (Win Console)  
"C:/Program Files (x86)/Microsoft SDKs/TypeScript/3.1/tsc.exe" file1.ts
 
← Previous topic
What the TypeScript ?
 
Next topic →
Create a new application with TypeScript (compile in the command line TypeScript in JavaScript)
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

  Объявления  
  Объявления  
 
What the TypeScript ?
How to download, install TypeScript ? How to check what is installed TypeScript and which version?
New app
Option 1. Write the application in a text editor, compile it on the command line
Create a new application with TypeScript (compile in the command line TypeScript in JavaScript)
Compilation settings Typescript in Javascript At the command prompt: removeComments, outFile, outDir
Option 2 [bgcolor=lightblue](best for me)[/bgcolor]. Writing the application in Visual Studio Code
Create a new application TypeScript in Visual Studio Code. Debug the application. We look in debugging how TypeScript is executed step by step. Breakpoints.
Create a new TypeScript app in Visual Studio Code. I"ve created some ts files. That"s why I use Webpack (collects all files into one js). Debug is running and Breakpoints are set.
Option 3. Writing an application in Visual Studio 2017
Create a new Node.js console app in Visual Studio 2017 to learn Typescript
TypeScript Features
A decorator for a class in TypeScript. Example: @MyDecarator1 class Book {...}
Convert class to {property object}. Typescript. Example: var myProps1 = {... myClass1};
WWW sites to explore TypeScript
Sites to explore TypeScript

  Ваши вопросы присылайте по почте: info@dir.by