dir.by  
  Search  
Programming, development, testing
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?
  Looked at 8719 times    
 How to download, install TypeScript ? How to check what is installed TypeScript and which version? 
last updated: 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?
Новое приложение
Вариант 1. Приложение пишем в текстовом редакторе, компилируем в командной строке
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
Вариант 2 (для меня лучший). Приложение пишем в 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.
Создаем новое приложение с TypeScript в Visual Studio Code. Я создал несколько ts файлов. Поэтому использую Webpack (собирает все файлы в один js). Работает отладка (Debug) и ставятся точки остановки Breakpoints.
Вариант 3. Приложение пишем в Visual Studio 2017
Создаем новое Node.js консольное приложение в Visual Studio 2017 для изучения Typescript
Возможности TypeScript
Decorator for the classroom in the TypeScript. Пример: @MyDecarator1 class Book {...}
Конвертируем class в {объект свойств}. Typescript. Пример: var myProps1 = {...myClass1};
WWW sites to explore TypeScript
Sites to explore TypeScript

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