← Back to blog

You're a Real TypeScript Developer Only If...

Learn what separates real TypeScript developers from pretenders. Discover 5 habits that prevent 38% of production bugs your team could avoid.

You're a Real TypeScript Developer Only If...

Most teams that "use TypeScript" actually write JavaScript with type annotations sprinkled on top. The compiler runs, the build passes, and yet production bugs keep arriving at the same rate as before — which raises an awkward question about what the migration actually bought.

The distinction matters in money, not ideology. When Airbnb analyzed six months of post-mortems, they found that 38% of bugs that reached production could have been prevented by TypeScript — but only TypeScript used properly, with the compiler actually allowed to do its job. A half-configured setup delivers a fraction of that protection while still costing the full price in build tooling and learning curve.

So here is the checklist. Not trivia about utility types — the habits that determine whether the type system is working for the business or just decorating the codebase.

1. ...You Run with strict: true and Have Never Turned It Off

This is the single biggest divider. TypeScript without strict mode is a politeness system: it offers suggestions, the code ignores them, everyone moves on. With strict: true, the compiler enforces the two checks that catch the most real-world bugs:

  • strictNullChecks — every value that might be null or undefined must be handled before use. Tony Hoare, who invented the null reference, called it his "billion-dollar mistake" — his estimate of the cumulative cost of null-related crashes across the industry. Strict null checks eliminate that entire bug class at compile time.
  • noImplicitAny — no value silently escapes the type system.

Put simply: a non-strict TypeScript project is a JavaScript project with longer file extensions.

A common objection is that enabling strict mode on an existing codebase produces hundreds of errors. True — and every one of those errors is a place where the code makes an assumption nothing verifies. The pragmatic path for a legacy migration is to enable strict mode for new files immediately and burn down the old errors file by file, rather than postponing strictness to a "later" that never arrives.

What this means for your project: if a contractor delivers "a TypeScript codebase," open tsconfig.json before accepting it. "strict": true should be the first thing visible. Its absence is a finding, not a preference.

2. ...any Makes You Uncomfortable

Every any is a hole cut in the safety net. The compiler stops checking anything that flows through it — and type unsafety is contagious: one any returned from a data-fetching function silently disables checking in every component that consumes it.

A real TypeScript developer reaches for the honest alternatives:

  • unknown when the type genuinely isn't known yet — it forces a check before use instead of permitting everything.
  • A narrowed union ("pending" | "active" | "closed") when the value has a fixed set of shapes.
  • Generics when the type varies but follows a pattern.

The lint rule @typescript-eslint/no-explicit-any makes this a team standard instead of a personal virtue. Teams that allow casual any usage typically discover the cost during refactors: rename a field, the compiler reports zero errors, and the broken screens surface one by one in production over the following weeks.

Honest take: an occasional, commented any at a genuinely untypeable boundary — a legacy library with no type definitions, a quick prototype — is a reasonable engineering trade-off. Fifty uncommented anys scattered through business logic is a JavaScript codebase wearing a costume.

3. ...You Validate at the Boundaries, Because You Know Types Are Erased at Runtime

This is the conceptual test that separates people who understand TypeScript from people who write it. Types do not exist in the running application. They are erased at compile time. Declaring an API response as interface User { email: string } is a promise the developer makes — the compiler verifies the code against that promise, but nothing verifies the promise against reality.

When the backend changes a field, renames email to emailAddress, or returns an error object instead of a user, the type annotation does nothing. The data flows in mistyped, and the failure surfaces somewhere far from the cause — the classic "undefined is not a function" three layers deep.

Real TypeScript developers validate at every boundary where data enters the system: API responses, webhook payloads, form input, environment variables, anything read from storage. Runtime validation libraries like Zod make this nearly free: define the schema once, get both the runtime check and the static type derived from it — one source of truth instead of two that drift apart.

What this means for your project: the most expensive integration bugs — payment provider changes a webhook field, CRM API returns a new error shape — turn from silent data corruption into a logged, alertable validation failure at the front door. Debugging time drops from hours of tracing to minutes of reading one error message.

4. ...You Let the Compiler Type Your Returns (and Type Your Public APIs Explicitly)

Two habits that look contradictory but aren't:

  • Inside a module, lean on inference. Annotating every local variable adds noise without adding safety — the compiler already knows.
  • At public boundaries — exported functions, shared utilities, library entry points — write explicit return types. An inferred return type changes silently when the implementation changes; an explicit one turns the same change into a compile error at the source instead of a confusing error at every call site.

This is the LEGO-instructions principle: inside one assembly step, nobody needs labels on every brick. But the connection points between assemblies need exact specifications, because that's where other people's work attaches.

5. ...You Make Invalid States Unrepresentable

The intermediate TypeScript developer types what data looks like. The real one types what data is allowed to be. Compare:

  • A request state as { loading: boolean; data?: User; error?: string } — which technically permits loading: true with both data and error present, a state that means nothing.
  • A discriminated union: { status: "loading" } | { status: "success"; data: User } | { status: "error"; error: string } — where the nonsense state cannot be constructed at all.

The second version deletes a whole category of defensive if checks and the bugs that live between them. The compiler also enforces exhaustiveness: add a fourth status, and every switch that fails to handle it becomes a compile error — a to-do list generated automatically, with file and line numbers.

Real numbers: this is exactly the bug class behind a large share of Airbnb's preventable-by-TypeScript findings — values present when they shouldn't be, absent when code assumed they would be. Modeling states as unions moves the cost of those bugs from production incidents (hours, on-call, customer impact) to compile errors (seconds, before commit).

6. ...Your Types Document the Domain, Not Just the Syntax

function process(data: object): object compiles. It also tells the next developer nothing. Compare with function applyDiscount(order: Order, discount: PercentDiscount): PricedOrder — readable as a sentence, enforceable by the machine, and impossible to call with the arguments reversed.

This is where TypeScript pays off as a documentation system that cannot go stale. README files and wiki pages describe the code as it was when someone last edited them; types describe the code as it is, verified on every build. For teams with rotation — agencies, growing startups, projects handed between contractors — this is the difference between a two-day onboarding and a two-week one. New developers explore the domain through autocomplete instead of through archaeology.

7. ...You Treat Compiler Errors as Information, Not Obstacles

The telltale anti-patterns of a developer fighting the compiler instead of using it:

  • as any to silence an error without understanding it
  • // @ts-ignore sprinkled like seasoning
  • Non-null assertions (!) on values that genuinely can be null

Each of these says: "the compiler found a problem, and the response was to fire the compiler." Every suppressed error is a bug report deleted unread. The error was pointing at a real gap — a case unhandled, an assumption unverified — and the suppression guarantees it will be rediscovered later, at runtime, by a user.

The professional response to a confusing compiler error is to ask what the compiler knows that the code doesn't. About nine times in ten, the compiler is right.

8. ...You Know When TypeScript Is the Wrong Answer

Type rigor is an investment with a payback period, and not every project lives long enough to collect. Honest take: a landing page, a throwaway script, a weekend prototype that will be discarded after the demo — the strict-typing overhead there buys protection for code with no future. Plain JavaScript, or TypeScript in loose mode, is the defensible choice.

The economics flip the moment code acquires a future: multiple contributors, a maintenance horizon beyond a few months, or business logic where bugs cost real money. That flip happens earlier than most teams expect — usually around the second developer or the third month, whichever comes first. The industry has voted accordingly: TypeScript ranks among the most-used and most-admired languages in the Stack Overflow Developer Survey, and it became one of the top three languages on GitHub by 2024 — adoption driven by maintenance economics, not fashion.

Alternatives and Trade-Offs, Honestly

JSDoc annotations + checkJs. Type checking without a build step — the compiler reads types from comments in plain .js files. Weaker ergonomics, but a legitimate path for codebases that can't adopt a compile step. Several major open-source projects run this way deliberately.

Loose TypeScript as a permanent state. The worst position on the curve: full tooling cost, minority of the safety benefit. Either commit to strict mode on a burn-down schedule or save the build complexity.

Build-time cost. Type checking takes real time on large codebases, and slow CI is a real expense. The mitigation landscape is improving fast — Microsoft's native TypeScript compiler port targets roughly 10x faster type checking — but today the standard pattern is fast transpilation (esbuild, swc) for dev builds with type checking as a parallel CI step. The check still runs; it just stops blocking the inner loop.

Key Takeaway for Business:

  1. TypeScript adoption is binary in cost but graded in benefit. The tooling, build step, and hiring implications cost the same whether the codebase uses strict mode or not — but the bug prevention (the kind behind Airbnb's 38% figure) only materializes with strict checks, no casual any, and runtime validation at the boundaries. Paying full price for partial protection is the most common failure mode.

  2. The audit is cheap. Three checks reveal a codebase's real type discipline in ten minutes: "strict": true in tsconfig, a count of any and @ts-ignore occurrences, and whether external data is validated at entry points. Any technical reviewer can run them before a project handover or an acqui-hire.

  3. Types are the only documentation that can't lie. For any project expected to outlive its original authors — which is every project that succeeds — machine-verified types are the cheapest knowledge-transfer mechanism available. They cut onboarding time, make refactors a compile-error checklist instead of a bug hunt, and convert a whole class of production incidents into pre-commit errors.

Here is what we recommend: don't ask whether a team "uses TypeScript." Ask whether the compiler is allowed to say no to them. That one answer predicts the bug rate better than the file extensions do.

This article is based on publicly available sources and may contain inaccuracies.

Related articles

✦SqueezeAI
  1. Половина пути не считается: Airbnb обнаружила, что TypeScript мог бы предотвратить 38% продакшн-багов — но только при правильном использовании. Небрежно настроенный проект обходится в полную стоимость (тулинг, кривая обучения), давая лишь долю защиты.
  2. `strict: true` — главный водораздел: без него TypeScript — это «система вежливости», которая делает предложения, а код их игнорирует; конкретно `strictNullChecks` закрывает целый класс null-ошибок, которые Тони Хоар оценил как «ошибку на миллиард долларов».
  3. `any` заразен: один `any` в функции получения данных молча отключает проверку типов во всех компонентах, которые её потребляют — вместо него `unknown` вынуждает явно проверить тип перед использованием.
  4. Типы стираются в рантайме, поэтому граничный ввод (ответы API, пользовательские данные) нужно валидировать явно — TypeScript не даёт никаких гарантий для данных, пришедших извне.

Powered by B1KEY