This repository contains my step-by-step TypeScript practice files, logic building, and type-safety exercises. It demonstrates fundamental to intermediate TypeScript concepts without using external frameworks.
| Concept | Key Mechanics & Topics |
|---|---|
| Basic Types & Functions | Annotations, Primitive types, Arrays, Objects, Optional & Default Parameters |
| Interfaces & Extension | Object shape contracts, Optional properties, Interface merging, Readonly keys |
| Type Aliases & Union Types | Custom types, Union types (string | number), Array union types |
| Type Narrowing & Casting | typeof type guards, Type Assertions (as), DOM element type casting |
| Enums vs Literal Types | Constant Enums vs String Literal Types for strict state management |
| Utility Types | Practical usage of Partial<T>, Pick<T>, Omit<T>, and Record<K, T> |
- Type Safety: Applied strict typing to reduce runtime errors and enable autocomplete during development.
- DOM Scripting with TS: Handled HTML element selection using specific assertions (
HTMLInputElement,HTMLAnchorElement). - Utility Helpers: Leveraged built-in TypeScript utility types to keep object transformations clean and readable.
Muhammad Sheraz | Software Engineer