This repository contains a simple TypeScript demonstration created for the Vijua TypeScript presentation. It showcases core TypeScript features such as types, interfaces, and generics, and demonstrates how TypeScript is compiled into JavaScript.
- Node.js (v18+ recommended)
- npm
Install dependencies:
npm installCompile the TypeScript file:
npx tsc index.tsRun the generated JavaScript:
node index.js- Primitive types (
string,number,boolean) - Typed functions
- Interfaces
- Generics
- Type safety & compile-time errors
- TypeScript → JavaScript compilation flow
.
├── index.ts # TypeScript demo
├── index.js # Compiled JavaScript output
└── README.md
This demo is intended for technical audiences to quickly understand how TypeScript adds type safety, structure, and maintainability to JavaScript projects.