Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
TypeScript Indexed Access Types: Deriving Types from Existing Ones with T["key"]
We look at reading a property's type with T["key"], union indexes, getting an array's element type with T[number], T[K] in generics and deriving pieces from large API types.
keyof and typeof in TypeScript: Deriving Types from Values and Keys
We derive types from values with type-level typeof, build unions from a type's keys with keyof, look at the index signature surprise, and use the keyof typeof pattern in practice.
Classes in TypeScript: Access Modifiers, abstract, implements and override
What TypeScript adds to classes: property types and initialization, public/private/protected versus #private, readonly, abstract, implements, override, and a note on parameter properties.
Generic Interfaces, Types and Classes in TypeScript: Box, Result and Stack
We move type parameters from functions to types: Box<T> as a generic type alias, a paginated list as a generic interface, Result<T, E> for success and failure, and generic Stack and Registry classes.
Generic Constraints in TypeScript: extends, Default Types, const and NoInfer
We constrain type parameters with extends, tie two parameters together with keyof, use default type parameters, and steer inference with TS 5.0 const type parameters and TS 5.4 NoInfer.
Introduction to Generics in TypeScript: Taking the Type as a Parameter
Why generic functions exist, how a type parameter ties input to output, how TypeScript infers T, and how generics differ from any and unknown, with small examples.
Advanced Date Handling in JavaScript: Time Zones, UTC and Formatting with Intl
We see that Date holds a single moment, then cover UTC and ISO 8601 rules, Intl.DateTimeFormat options, "3 days ago" with Intl.RelativeTimeFormat, the daylight saving trap and a first look at Temporal.
JavaScript Modules in the Browser: import, export, Dynamic import() and Import Maps
We write a first module with type="module", see why file:// fails, and learn named and default exports, live bindings, dynamic import(), import maps and ES2025's JSON modules with import attributes.
JavaScript URL, URLSearchParams and the History API: Managing the Address Without a Reload
We take addresses apart with URL and URLSearchParams, look at the hash, compare pushState and replaceState, learn when popstate fires, and write a small framework-free SPA router.
JavaScript Web Storage and Cookies: localStorage, sessionStorage and document.cookie
We cover localStorage vs sessionStorage, storing objects with JSON, the cross-tab storage event, quota and security limits, cookie attributes through document.cookie, and why HttpOnly cookies stay invisible.
Advanced JavaScript Forms: FormData, the Constraint Validation API and Fetch
We collect values with form.elements and FormData, write our own rules with validity and setCustomValidity, catch the invalid event, and send the form with fetch without reloading the page.
Advanced JavaScript Events: Bubbling, Capturing, Event Delegation and CustomEvent
We walk through the capturing, target and bubbling phases, stopPropagation, event delegation with a single listener, the once/passive/signal options, CustomEvent and pointer events, with runnable examples.