https://github.com/shevchenkool/uvod-do-typescript
https://github.com/shevchenkool/uvod-do-typescript
typescript
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/shevchenkool/uvod-do-typescript
- Owner: ShevchenkoOl
- Created: 2025-01-31T07:25:21.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-07T14:21:55.000Z (3 months ago)
- Last Synced: 2025-02-07T15:26:39.283Z (3 months ago)
- Topics: typescript
- Language: TypeScript
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Installing and configuring the development environment:
1. we will use [Node.js](https://nodejs.org/en/) to install and configure the development environment;
2. install __TypeScript__ using __Node Package Manager (npm)__, which is automatically installed with Node.js: ``` npm install -g typescript ```.
This command installs TypeScript globally on your computer, allowing you to use it in any project;
3. after installation, you can check the TypeScript version and its functionality using: ``` tsc -v ```;
4. to work with TypeScript, I recommend using [Visual Studio Code (VS Code)](https://code.visualstudio.com/).__Now we have everything we need to get started with TypeScript! You can create a new TypeScript file with the .ts extension and start writing code.__
```test.ts```
```html
function add(num1: number, num2: number) {
return num1 + num2;
}
add(1, 1);
```
Let's compile it in the console using the command:```tsc test.ts```.
We have a __js__ file next to the __ts__ file:

Let's open the __js__ file:

the contents of our __ts__ file were overwritten by our __js__ format.
We can also monitor file changes in real time by running the command:
```tsc test.ts -w``` or ```tsc test.ts -watch```.
In order not to stop ```npm start``` execution every time, you can open ```tsc -w``` in a separate console.
__Every time you save the file, it will be recompiled, if there is an error, you will immediately see it in the console.__
### Author
This repository was created and maintained by [Oleksii Shevchenko](https://shevchenkool.github.io/portfolio/). Questions, suggestions and feedback can be directed to [email]([email protected]) or [linkedin profile](linkedin.com/in/oleksii-shevchenko-535ab61b8).
If you have any questions or suggestions, feel free to create an [issue](https://github.com/ShevchenkoOl/phonebook/issues) or submit a [pull request](https://github.com/ShevchenkoOl/phonebook/pulls).