Welcome to the Learn TypeScript repository! This project is designed to help you get started with TypeScript from scratch — perfect for JavaScript developers looking to level up.
TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.
├── test/
│ ├── basics.ts # Basic syntax: types, variables, functions
│ ├── arrays.ts # Working with arrays and tuples
│ ├── objects.ts # Interfaces and object types
│ ├── classes.ts # OOP: classes, inheritance, access modifiers
│ ├── generics.ts # Generic functions and types
│ ├── utility-types.ts # Partial, Pick, Readonly, etc.
├── tsconfig.json # TypeScript compiler configuration
├── package.json # Project dependencies
├── jest.config.js # Jest configuration for TypeScript
└── README.md # You’re here!
git clone https://github.com/maniziva/learn-typescript.git
cd learn-typescript
npm install
npx tsc # Compiles all .ts files in the src/ folder
npx ts-node src/basics.ts
This project uses Jest for testing. Jest is configured to work with TypeScript using ts-jest
.
npm test
npx jest test/basics.test.ts
To re-run tests automatically when files change:
npx jest --watch