Skip to content
TypeScript engineering

TypeScript for a maintainable codebase

Updated

TypeScript appears throughout our published portfolio, including Reveal’s web, extension and admin surfaces. A portfolio record is delivery evidence, not a count of products guaranteed to remain live. For a new change, define the data contracts and behaviour checks the team needs before choosing the typing scope.

The reason is simple: eyeballing generated code for correctness does not scale, and the compiler does. This page sets out what we actually expect from a type system and, just as importantly, where we stop expecting anything from it.

24
published portfolio projects
5+
years building for production
12
countries the work runs in
100%
of code read by a senior engineer
1 day
to hear back, from the engineer

What types are for in the AI era

AI writes a function in seconds, but it does not know what the calling side expects. Type definitions turn that expectation into a contract a machine can check. If generated code breaks the contract, it fails at compile time rather than in production, where finding the same problem costs far more and usually involves a customer. That is why the first thing we write on a new project is generally the interface definitions and the data schemas.

Where type safety ends

TypeScript only runs at compile time. Data arriving over the network, form input and third-party responses can be anything at runtime. If you do not validate at those boundaries, the type system hands you false confidence, which is more dangerous than no confidence at all. We validate every piece of external data entering the application and trust the types everywhere else. The boundary is a design decision, so we mark it explicitly instead of leaving people to guess where it sits.

The cost of over-typing

Complex generics and clever type tricks can make a codebase unreadable. A year later, whoever is trying to unpick that type loses more time than the bug it was meant to prevent would ever have cost. We prefer simple, readable types. The goal is not to show off with the type system, it is that the next developer can touch the codebase with confidence and without a two-hour detour into type inference rules.

Sharing types end to end

Reveal’s case documents a monorepo with web, browser-extension and admin surfaces built with TypeScript. It does not establish that a type change catches every affected runtime behaviour. For a multi-surface product, define shared contracts, external-data validation and representative integration checks together; types support review but do not replace acceptance evidence.

Questions

The things people ask before starting.

Should we migrate our existing JavaScript project to TypeScript?

If the project is actively developed, usually yes, but not in one pass. We migrate gradually, typing the data model and the external boundaries first. On a frozen project that nobody is changing, the return is low and we will tell you so.

Doesn't writing types slow development down?

The effort depends on the existing code and the change being made. Agree a readable typing scope and behaviour checks, then assess representative refactors. Types do not establish a universal time saving or payback period.

Who reviews the code?

Every change is read by an engineer before it is merged. The compiler catches type errors, and a human checks that the logic and the authorisation rules are correct, because those are not things a type system can verify for you.

Will our team be able to maintain the code after handover?

That is the goal. We hand over type definitions and documentation together, so the developer taking the work on can read what the code expects rather than reverse-engineering it from observed behaviour.

How it starts

What happens after you write to us.

  1. 01

    You describe the product

    One paragraph on what you are building, roughly when you need it, and who it is for. No brief, no form with fifteen fields.

  2. 02

    You get a reply within a day

    From the engineer who would do the work, not a sales team. If we are not the right fit we say so, and where possible we point you somewhere better.

  3. 03

    You get a scoped plan

    Scope, price and timeline in writing before anything is committed. You decide with the numbers in front of you.

No long contract to begin, no lock-in to our tooling, and the code is yours from the first commit.

Start a conversation
Contact

Looking for an engineering partner for the long haul?

A short note about the product, the timeline and who it is for is enough to start. You will hear back from the engineer who would do the work, not a sales team.

Ankara / Türkiye · Working across European and US time zones