Welcome to my repository of TypeScript practices! Here, you'll find exercises and basic examples that cover essential TypeScript concepts and techniques. This repo is designed for anyone looking to learn and apply TypeScript practically. The exercises you'll find on the repository are from Fernando Herrera's course as part of the way to learn Angular. But first things first, let's start with TypeScript!
- Introduction to TypeScript: Basic setup and introduction to get started with TypeScript.
- Basic Types: Working with string, number, boolean, any, and type declarations in TypeScript.
- Objects, Arrays, and Interfaces: Defining complex structures and interfaces.
- Functions and Parameters: Declaring and using functions, passing arguments, and returning values.
- Array and Object Destructuring: Simplify data manipulation using destructuring.
- Imports and Exports: Structuring modules, imports, and exports.
- Classes and Constructors: Object-oriented programming with classes and constructors in TypeScript.
- Generic Types: Creating generic functions and classes for code reuse.
- Decorators: Using decorators to modify classes, properties, and methods.
- Optional Chaining: Safely handle optional properties to avoid runtime errors.
- Clone this repository:
git clone https://github.com/yourusername/my-typescript-basics-repo.git
- Install necessary dependencies (if applicable):
npm install
- Run examples with:
tsc example-file.ts node example-file.js
- Node.js (recommended version: 14+)
- TypeScript (install globally with npm install -g typescript)
All contributions are welcome! If you find any issues or have ideas for improvement, feel free to open an issue or submit a pull request.
👩💻 Let’s keep leveling up our programming skills together! The TypeScript journey begins now! 🌟
- This project was created using Vite
- Create the project:
npm create vite -- write your project\'s name, now choose a framework, which in my case was 'Vanilla', and a variant, whichc for me was 'TypeScript'
- Access to the project directory on your terminal and install all needed packages:
cd <your-projects-name> npm install
- Run npm on dev:
npm run dev