Skip to content

TypeScript learning journal with day-wise notes, examples, and practice projects — from basics to advanced.

Notifications You must be signed in to change notification settings

kushkumarkashyap7280/TYPESCRIPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript Logo

#

TYPESCRIPT

Welcome to my TypeScript Journey! 🚀

Here I document my daily progress as I learn and apply TypeScript fundamentals, best practices, and advanced concepts. This journal helps me stay consistent, track what I've learned, and build confidence in writing type-safe JavaScript code.


📋 Prerequisites

Before starting this TypeScript journey, you should have:

  • JavaScript Fundamentals: Basic understanding of variables, functions, objects, arrays, and ES6+ features
  • Node.js: Basic familiarity with Node.js and npm (for running TypeScript)
  • Code Editor: VS Code or similar with TypeScript support
  • Terminal/Command Line: Comfort with basic commands

If you need a JavaScript refresher, check out this JS repo.


🎯 Why TypeScript?

Because TypeScript:

  • Catches bugs early ⚠️ - Type checking at compile time
  • Makes large projects easier to manage 🏗️ - Better code organization and maintainability
  • Is widely adopted in modern web development 💼 - Industry standard for scalable applications
  • Provides excellent IDE support 🛠️ - IntelliSense, refactoring, and navigation
  • Gradual adoption 📈 - Can be introduced incrementally to existing JS projects

This repo is my learning companion to understand and master TypeScript step-by-step.


📚 Learning Approach

  • Daily Learning: Learn a new topic every day
  • Hands-on Practice: Document with practical code examples
  • Progressive Building: Each day builds upon previous concepts
  • Real-world Applications: Focus on practical, usable knowledge
  • Consistent Documentation: Track progress and insights

📁 Project Structure

TYPESCRIPT/
├── day_001/                    # Types & Setup
│   ├── README.md              # Comprehensive guide
│   ├── index.ts               # Practical examples
│   └── tsconfig.json          # TypeScript configuration
├── day_002/                    # Arrays, Objects & Call Signatures
│   ├── README.md              # Detailed documentation
│   ├── array.ts               # Array methods and typing
│   ├── object.ts              # Object typing and aliases
│   └── call_signature.ts      # Function signatures in objects
├── day_003/                    # Advanced Types: Enums, Tuples, Union & Intersection
│   ├── README.md              # Detailed documentation
│   ├── Enums.ts               # String enums and role-based access
│   ├── Tuples.ts              # Fixed-length arrays with types
│   └── Union_and_Intersection.ts  # Union and intersection types
├── day_004/                    # Generics & Interfaces
│   ├── README.md              # Detailed documentation
│   ├── generics.ts            # Generic types and functions
│   ├── interface.ts           # Interface declarations
│   └── interface.js           # Compiled JavaScript
├── day_005/                    # Project Structure & Configuration
│   ├── README.md              # Detailed documentation
│   ├── index.htm              # HTML file for browser execution
│   ├── tsconfig.json          # Project-specific TypeScript configuration
│   └── src/                   # Source directory
│       ├── app.ts             # Main application logic
│       └── script.ts          # Additional TypeScript examples
└── README.md                   # This overview

Each folder includes:

  • Comprehensive documentation with explanations and examples
  • Practical code samples demonstrating concepts
  • Key takeaways and best practices
  • Usage instructions for running the code


🛠 How to Run the Code

Prerequisites

# Install TypeScript globally (if not already installed)
npm install -g typescript

# Or use npx for one-time execution
npx tsc --version

Compilation and Execution

# Navigate to any day folder
cd day_001  # or day_002

# Compile TypeScript files
tsc filename.ts

# Run the compiled JavaScript
node filename.js

# Or use ts-node for direct execution
npx ts-node filename.ts

Example Commands

# Day 1 examples
cd day_001
npx ts-node index.ts

# Day 2 examples
cd day_002
npx ts-node array.ts
npx ts-node object.ts
npx ts-node call_signature.ts

🤝 Contributing to Learning

This is a personal learning journal, but if you're following along:

  1. Fork this repository
  2. Create your own learning branch
  3. Document your progress and insights
  4. Share your learnings and improvements

📚 Additional Resources


📅 Daily Progress

📖 Day 1 – Types & Setup

Core Concepts Covered:

  • TypeScript installation and setup
  • Type annotations and primitive types
  • Function typing and parameters
  • Type inference and best practices
  • TypeScript configuration (tsconfig.json)

Files:

Key Learning: Understanding TypeScript's type system and how it enhances JavaScript development.


🔢 Day 2 – Arrays, Objects & Call Signatures

Core Concepts Covered:

  • Arrays: Declaration, typing, and iteration methods
  • Objects: Type definitions, type aliases, and nested structures
  • Call Signatures: Function signatures within object types

Files:

Key Learning: Mastering TypeScript's approach to complex data structures and function typing within objects.


🎯 Day 3 – Advanced Types: Enums, Tuples, Union & Intersection

Core Concepts Covered:

  • Enums: String enums for type-safe constants and role-based access control
  • Tuples: Fixed-length arrays with specific types and readonly modifiers
  • Union Types: OR logic with | operator for flexible parameters
  • Intersection Types: AND logic with & operator and understanding the never type

Files:

Key Learning: Understanding advanced type system features that enable robust, type-safe applications with flexible yet controlled data structures.


🧩 Day 4 – Generics & Interfaces

Core Concepts Covered:

  • Generics: Type-safe functions and classes with flexible type parameters
  • Function Overloading: Multiple type signatures for the same function
  • Interfaces: Defining object shapes and contracts for type checking

Files:

Key Learning: Implementing reusable, type-safe code patterns with generics and defining clear interfaces for object structures.


🏗️ Day 5 – Project Structure & Configuration

Core Concepts Covered:

  • Project Structure: Organizing TypeScript files in a real project
  • Configuration: Advanced tsconfig.json settings
  • Browser Integration: Running TypeScript in the browser
  • Module System: Using ES modules in TypeScript

Files:

Key Learning: Structuring a TypeScript project for scalability with proper configuration and organization patterns.


🤝 Let's Connect

GitHub: kushkumarkashyap7280 📫 Always happy to connect, collaborate, or share ideas!


Happy Learning & Type-Safe Coding!

About

TypeScript learning journal with day-wise notes, examples, and practice projects — from basics to advanced.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published