This repository contains solutions for the "Advanced Problem Solving with TypeScript & OOP" assignment.
solutions.ts: Contains the TypeScript implementation for all 7 coding problems, demonstrating proficiency in data typing, interfaces, classes, inheritance, type checking, and manipulation of data structures.blog-1.md: A technical blog post exploring why theanytype is considered a "type safety hole," whyunknownis a safer alternative, and how type narrowing works in TypeScript.blog-2.md: A technical blog post detailing how Generics allow developers to build reusable and strictly typed components and functions.
To run and test the TypeScript code, ensure you have Node.js and TypeScript installed. You can compile and run the file using ts-node:
npm install -g typescript ts-node
ts-node solutions.tsAlternatively, compile it to JavaScript and run with Node:
tsc solutions.ts
node solutions.js