typescript demo step by step

This commit is contained in:
Primakov Alexandr Alexandrovich
2024-10-09 00:16:12 +03:00
commit 14bd95b5ae
31 changed files with 2012 additions and 0 deletions

15
01_simple/Readme.md Normal file
View File

@@ -0,0 +1,15 @@
Для того что бы увидеть как typescript подсветит ошибку необходимо выполнить шаги:
1. Установка
```shell
npm install -g typescript
```
2. Переименовываем файл
> index.js -> index.ts
3. Наблюдаем результат
![screenshot](../assets/01.png)

6
01_simple/index.ts Normal file
View File

@@ -0,0 +1,6 @@
const square = { width: 10, height: 10 };
const check = () => console.log(square.width * square.heigth);