Apply clean code concepts to TypeScript projects with examples organized by programming topic.

labs42io.github.io/clean-code-typescript
clean-code-typescript homepage screenshot

About clean-code-typescript

clean-code-typescript is a free web guide that adapts Clean Code principles, from Robert C. Martin's book, to TypeScript. It describes itself as a guide to producing readable, reusable, and refactorable software, not as a style guide. The guide is inspired by clean-code-javascript.

The guide is organized by programming topic. Its table of contents lists Introduction, Variables, Functions, Objects and Data Structures, Classes, SOLID, Testing, Concurrency, Error Handling, Formatting, and Comments. The homepage excerpt shows detailed examples only for the introduction and variables sections, so the depth of the other sections is not described here. The guide also links to translations. The guide states that its principles are guidelines, that not every principle must be strictly followed, and that few will be universally agreed upon.

Key features

  • Variable naming guidance with bad and good TypeScript examples
  • Advice on searchable names and named constants in place of magic numbers
  • Default argument examples as an alternative to conditional fallback code
  • Enum examples for documenting intent in TypeScript code
  • Topic sections covering functions, classes, SOLID, testing, error handling and comments
Best for: Developers and teams writing TypeScript who want to review their code for readability and maintainability.
Good for
  • Each example pairs a weaker version of the code with an improved TypeScript version.
  • Adapted from the Clean Code book by Robert C. Martin for TypeScript.
  • Covers topics from variable naming through testing, concurrency, and formatting.
Watch out for
  • The guide states that it is not a style guide.
  • The guide states that not every principle must be strictly followed, and few will be universally agreed upon.
  • The homepage excerpt shows detailed examples only for the introduction and variables sections.

clean-code-typescript at a glance

Type
Online tool
Pricing
Not confirmed. Check the site
Platforms
Web
Open source
Not stated
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

clean-code-typescript alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Windows

learn.microsoft.com/en-us/windows/apps/design

Microsoft Learn outlines design guidelines and interface examples for Windows applications.

Popular in Science, Math & Technology

Well-known listings from the same topic.

All 276

clean-code-typescript FAQ

Is this guide a style guide?
No. The guide states that it is not a style guide. It describes itself as a guide to producing readable, reusable, and refactorable software in TypeScript.
Does the guide cover testing and error handling?
Its table of contents lists sections on Testing, Concurrency, and Error Handling. The homepage excerpt does not show their contents.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing