Property-based testing for engineers who have not tried it yet
Move beyond example-based unit tests to property-based testing to ensure your type-safe logic holds under any arbitrary input.
5 August 2026
TypeScript compiler enthusiast and tooling engineer at a Stockholm dev tools company. Wrote the ESLint plugin that enforces exhaustive discriminated union handling, now downloaded 200 K/month.
Move beyond example-based unit tests to property-based testing to ensure your type-safe logic holds under any arbitrary input.
5 August 2026
Stop masking bugs with mocks. Learn how to use TypeScript's exhaustive union checking to ensure your production code handles every state transition correctly.
5 August 2026
Stop treating generics as magic and start viewing them as the primary constraints that enforce code safety and exhaustiveness across your applications.
2 August 2026
Mastering template literal types to enforce strict API contracts and eliminate runtime string parsing errors through compile-time constraints.
1 August 2026
Integration tests verify that services work together. Contract tests verify that services agree on the interface they share. The distinction becomes important when teams own different services and evolve them independently.
21 July 2026
TypeScript's default configuration leaves many unsafe patterns permitted. The compiler flags that enforce meaningful correctness — strict null checks, no implicit any, noUncheckedIndexedAccess, and others — are not on by default and must be deliberately enabled.
21 July 2026
Unit tests verify that individual functions work correctly in isolation. Integration tests verify that the functions work correctly together. The bugs that escape unit tests and appear in production almost always live in the interaction between components — which only integration tests cover.
21 July 2026
End-to-end tests are the highest-fidelity verification of user-facing behavior. They are also the slowest and most flaky tests in a suite. The approach that makes E2E tests useful without making CI painful is a matter of what is tested, not just how.
20 July 2026
TypeScript's type system catches many errors at compile time, but specific patterns produce types that are technically valid yet semantically incorrect. These are the patterns that produce runtime errors in TypeScript codebases.
20 July 2026
Client-side form validation catches format errors early and improves user experience, but it cannot enforce business rules, authorization constraints, or uniqueness invariants. Understanding the validation layers and their responsibilities prevents both duplicate effort and dangerous gaps.
19 July 2026
Discriminated unions model state that cannot exist simultaneously — loading and data, success and error, authenticated and anonymous. The pattern eliminates entire classes of impossible state bugs and makes exhaustive handling of variants compiler-enforced.
19 July 2026
Branded types use TypeScript's type system to distinguish values that have the same primitive type but different semantic meanings. Passing a user ID where an order ID is expected becomes a compile-time error instead of a silent runtime bug.
19 July 2026