Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript Learning Journey

A structured repository for my of learning TypeScript, from basic concepts to advanced techniques.

Overview

This repository contains a comprehensive set of examples, exercises, and mini-projects to help you learn TypeScript. The project is organized into different sections based on complexity levels, making it easy to progress through your learning journey.

Getting Started

Prerequisites

  • Node.js (v14 or later)
  • npm (comes with Node.js)

Installation

  1. Clone this repository:

    git clone https://github.com/awanicaleb/typescript.git
    cd typescript
  2. Install dependencies:

    npm install
  3. Run the main example:

    npm start

Project Structure

typescript/
├── src/
│   ├── basics/         # Basic TypeScript concepts
│   ├── intermediate/   # Intermediate concepts
│   ├── advanced/       # Advanced TypeScript features
│   ├── exercises/      # Practice exercises
│   ├── projects/       # Mini-projects
│   ├── utils/          # Utility functions
│   ├── tests/          # Test files
│   └── index.ts        # Main entry point
├── dist/               # Compiled JavaScript files
├── node_modules/       # Node.js dependencies
├── package.json        # Project configuration
├── tsconfig.json       # TypeScript configuration
├── .gitignore          # Git ignore file
└── README.md           # Project documentation

Features

Basic Concepts

  • Types (string, number, boolean, etc.)
  • Arrays and tuples
  • Interfaces
  • Enums
  • Type annotations

Intermediate Concepts

  • Classes and inheritance
  • Interfaces with advanced features
  • Function types
  • Type aliases
  • Union and intersection types

Advanced Concepts

  • Generics
  • Type guards
  • Utility types
  • Advanced type manipulation
  • Decorators

Exercises

  • Practical exercises to test your knowledge
  • Increasingly challenging problems

Projects

  • Todo application

Utilities

  • Logging utility
  • Type helpers
  • Utility functions

Available Scripts

  • npm start: Run the main index.ts file that demonstrates all examples
  • npm run build: Compile TypeScript to JavaScript
  • npm run dev: Run with live reload for development
  • npm run basics: Run basic TypeScript examples
  • npm run intermediate: Run intermediate examples
  • npm run advanced: Run advanced examples

Learning Path

  1. Start with the Basics

    • Understand TypeScript's type system
    • Learn about interfaces and basic types
  2. Move to Intermediate Concepts

    • Explore classes and object-oriented programming
    • Learn about more complex type features
  3. Tackle Advanced Topics

    • Master generics
    • Understand advanced type manipulations
  4. Complete the Exercises

    • Reinforce your knowledge
    • Practice type-safe coding
  5. Build Projects

    • Apply what you've learned in real-world scenarios

Tips for Learning TypeScript

  1. Understand JavaScript First: TypeScript is a superset of JavaScript, so having a solid understanding of JavaScript will help.

  2. Use Type Annotations: Always try to specify types explicitly when learning. This helps you understand how the type system works.

  3. Read the Error Messages: TypeScript's error messages are descriptive and often tell you exactly what's wrong.

  4. Use the Official Documentation: The TypeScript Handbook is an excellent resource.

  5. Practice Regularly: Consistent practice is key to mastering TypeScript.

Recommended Resources

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • TypeScript team for creating such an amazing language
  • The open-source community for providing valuable resources

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages