Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
14 posts found
Introduction to Generics in TypeScript: Taking the Type as a Parameter
Frontend PART 01

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.

3 Nov 2026 8 min 1
Generic Constraints in TypeScript: extends, Default Types, const and NoInfer
Frontend PART 02

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.

3 Nov 2026 7 min 1
Generic Interfaces, Types and Classes in TypeScript: Box, Result and Stack
Frontend PART 03

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.

3 Nov 2026 7 min 2
Classes in TypeScript: Access Modifiers, abstract, implements and override
Frontend PART 04

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.

3 Nov 2026 8 min 1
keyof and typeof in TypeScript: Deriving Types from Values and Keys
Frontend PART 05

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.

3 Nov 2026 8 min 1
TypeScript Indexed Access Types: Deriving Types from Existing Ones with T["key"]
Frontend PART 06

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.

3 Nov 2026 8 min 1
TypeScript Utility Types 1: Partial, Required, Readonly, Pick, Omit and Record
Frontend PART 07

TypeScript Utility Types 1: Partial, Required, Readonly, Pick, Omit and Record

We use Partial, Required, Readonly, Pick, Omit and Record with realistic examples, combine them in a form model and look at silent pitfalls such as a typo inside Omit.

3 Nov 2026 8 min 2
TypeScript Utility Types 2: Exclude, Extract, NonNullable, ReturnType and More
Frontend PART 08

TypeScript Utility Types 2: Exclude, Extract, NonNullable, ReturnType and More

We filter unions with Exclude, Extract and NonNullable, and derive types from functions and classes with ReturnType, Parameters, Awaited, InstanceType and ConstructorParameters.

3 Nov 2026 8 min 1
TypeScript Type Guards: Type Predicates and Assertion Functions
Frontend PART 09

TypeScript Type Guards: Type Predicates and Assertion Functions

We write type predicates with x is T and assertion functions with asserts, and look at TypeScript 5.5's inferred type predicates and narrowing arrays with filter, pitfalls included.

3 Nov 2026 8 min 2
Asynchronous Code in TypeScript: Typing Promise, async and fetch Responses
Frontend PART 10

Asynchronous Code in TypeScript: Typing Promise, async and fetch Responses

We look at Promise<T> and async return types, why a fetch response is any, runtime validation with unknown and hand-written type guards, and the types of Promise.all and allSettled.

3 Nov 2026 10 min 1
Modules in TypeScript: import type, verbatimModuleSyntax and File Extensions
Frontend PART 11

Modules in TypeScript: import type, verbatimModuleSyntax and File Extensions

We look at modules versus scripts in TypeScript, import type and export type, why verbatimModuleSyntax matters, .ts extensions in imports, and bundler versus nodenext resolution.

3 Nov 2026 8 min 1
Error Handling in TypeScript: unknown in catch, Narrowing Errors and the Result Pattern
Frontend PART 12

Error Handling in TypeScript: unknown in catch, Narrowing Errors and the Result Pattern

We look at why the catch variable is unknown, narrowing with instanceof Error, custom error classes, Promise pitfalls, and modeling errors with Result and discriminated unions.

3 Nov 2026 9 min 1
Blog Map