Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Your First ASP.NET Core Web API Project: .NET SDK, global.json and Project Structure
SDK versus runtime, multiple SDKs and global.json, how the dotnet new webapi template changed across versions, the csproj and TargetFramework, launchSettings.json and why the first request returns 307.
What Is an ASP.NET Core Web API? HTTP and REST Fundamentals
We meet the Web API through the HTTP window: request and response anatomy, methods and idempotency, status code families and resource-oriented URLs. We also lay out the series: a .NET 6 core, then version posts.
TypeScript 7 and Beyond: The Go-Based Compiler and the New Defaults
We look at the Go-based TypeScript 7 compiler, the defaults that came with 6.0, the settings removed in 7.0, isolatedDeclarations, the TC39 Type Annotations proposal and what the 7.1 beta brings.
Migrating from JavaScript to TypeScript: checkJs, JSDoc and Gradual strict
We walk through migrating a JavaScript project to TypeScript gradually: allowJs, checkJs and // @ts-check, writing types with JSDoc, the JSDoc changes in TypeScript 7, gradual strict and @ts-expect-error.
Type-Level Programming in TypeScript: Solving the Easy type-challenges
We solve ten easy type-challenges (MyPick, MyReadonly, TupleToObject, First, Length, MyExclude, MyAwaited, If, Concat, Includes), each checked with type-level tests built on Equal and Expect.
using and await using in TypeScript: Resource Management with Symbol.dispose
We look at the TypeScript side of using and await using from TS 5.2: the Disposable types, the lib setting you need, the compiler's checks, DisposableStack, and what tsc's output means for Node and Safari.
Decorators in TypeScript: Standard TC39 Decorators and the context Object
We look at the standard decorators that arrived in TS 5.0: method, class, field and accessor decorators, the context object, why they aren't erasable and how they differ from the old experimentalDecorators setting.
Branded Types in TypeScript: Keeping UserId and OrderId Apart
Where structural typing can't tell apart values with the same shape but different meaning, we use brands, produce them with validation functions and build a sturdier Brand helper with unique symbol.
Variance and Assignability in TypeScript: Covariance, Contravariance and strictFunctionTypes
We look at the direction of assignability, covariance in return types, contravariance in parameters, strictFunctionTypes, method bivariance, the array soundness hole and in/out variance annotations.
Recursive Types in TypeScript: JSON, DeepReadonly and DeepPartial
We cover self-referencing types, a recursive JSON type, DeepReadonly and DeepPartial with their function and array pitfalls, recursive conditional types and the TS2589 limit with tail recursion.
Template Literal Types in TypeScript: Building Strings at the Type Level
We cover union products with template literal types, patterns like ${number}, the Uppercase and Capitalize intrinsics, deriving event names, generating keys with mapped types and parsing routes with infer.
Mapped Types in TypeScript: Producing a New Type from an Existing One
We cover mapped type syntax, how homomorphic mapped types carry readonly and ? modifiers, managing modifiers with + and -, key remapping with as, and filtering properties with never.