Skip to content

aparnatonni/b7a1-typescript-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

B7A1 — Advanced Problem Solving with TypeScript & OOP

This repository contains the solution for the Level 2 Batch 7 Assignment 1.

File Structure

├── solutions.ts   # All 7 TypeScript problem solutions
├── blog-1.md      # Blog: any vs unknown & Type Narrowing
├── blog-2.md      # Blog: Generics in TypeScript
└── README.md

Problems Solved

# Function Description
1 filterEvenNumbers Filters even numbers from an array
2 reverseString Reverses a string
3 checkType Type guard for string or number
4 getProperty Generic property accessor with key constraint
5 toggleReadStatus Adds isRead property to a Book object
6 Student class Inherits from Person, adds grade & getDetails
7 getIntersection Returns common elements of two arrays

Blog Posts

  • blog-1.md — Why any is unsafe and unknown with type narrowing is the correct approach
  • blog-2.md — How Generics enable reusable, strictly-typed components and functions

About

B7A1 assignment submission for TypeScript fundamentals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors