
Engineering
Stop Reaching for any: Narrowing unknown in TypeScript
Why unknown is the type-safe replacement for any, and the narrowing patterns that make it practical in real code.
·4 min read
Tags
4 articles

Why unknown is the type-safe replacement for any, and the narrowing patterns that make it practical in real code.

Dependency injection in TypeScript with constructor injection, factory functions, DI containers and module composition — testable, without framework lock-in.

Hexagonal architecture in TypeScript: ports define business contracts, adapters handle infrastructure, and dependency inversion keeps the domain testable.

Not all clean code advice is created equal — these are the principles that genuinely reduce bugs, speed up onboarding, and survive real-world deadlines.