TypeScript

  • development
  • programming

Also known as: TypeScript, TS, typescript

TypeScript is a programming language that builds on JavaScript. It adds types, which are like labels that describe what kind of data something is — a number, a piece of text, a yes/no value, or a list.

Think of it like a form with clear fields. A normal JavaScript form might say "fill in the box." A TypeScript form says "fill in this box with a number between 1 and 10." It catches mistakes before they cause problems.

I use TypeScript for all my Payload CMS projects. It makes the code more reliable, because the computer checks the types while I am writing — not after something breaks on the live website.