← Articles
SL

Sven Lindqvist

Author

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.

typescripttestingarchitectureapi

Articles by Sven Lindqvist(12)

Contract testing between services: the approach that catches the gaps

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.

testingcontract-testingmicroservicesbackendapi

21 July 2026

The tsconfig settings that actually enforce the correctness you want

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.

typescripttsconfigtype-safetyfrontendbackend

21 July 2026

Integration tests that catch what unit tests consistently miss

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.

testingintegration-testsbackendqualitydevops

21 July 2026

End-to-end testing that does not slow your team down

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.

testinge2eplaywrightqualitydevops

20 July 2026

When your TypeScript compiles but your types are still wrong

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.

typescripttype-safetyfrontendbackend

20 July 2026

Form validation at scale: why client-side checks are not the full story

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.

typescriptvalidationformsbackendsecurity

19 July 2026

Discriminated unions in production TypeScript: patterns that scale

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.

typescripttype-safetydiscriminated-unionsfrontendbackend

19 July 2026