
JavaScript runs everywhere, from browsers to servers to mobile apps, but it was designed for small scripts. In a codebase with hundreds of files and several developers, nothing stops you from passing a string where a number was expected, calling a function with the wrong arguments or renaming a field and missing half of its uses. Those mistakes show up at runtime, often in production. TypeScript adds a type system on top of JavaScript so that most of them are caught in the editor, before the code ever runs.
This article explains what TypeScript is, how it works, where it is used, when it is worth the extra step, and how it compares with the alternatives.
What is TypeScript?
TypeScript is an open-source programming language developed by Microsoft. It is a superset of JavaScript: every valid JavaScript program is also valid TypeScript, and TypeScript adds optional static types on top. A compiler checks those types and then outputs plain JavaScript, so TypeScript runs anywhere JavaScript runs.
Microsoft made TypeScript public on 1 October 2012, at version 0.8, after two years of internal development. The language was designed by a team led by Anders Hejlsberg, the lead architect of C# and earlier the creator of Turbo Pascal and Delphi. It was open source from the start, under the Apache 2.0 licence. TypeScript 1.0 followed in April 2014.
Adoption grew steadily as frameworks moved to it: Angular is written in TypeScript, and React, Vue and Node.js projects increasingly start with it. GitHub's Octoverse 2025 report found that in August 2025 TypeScript became the most used language on GitHub by number of contributors, ahead of Python and JavaScript.
The biggest recent change is under the hood. TypeScript 7.0, released on 8 July 2026, is a native port of the compiler written in Go. Microsoft reports full builds between roughly 8 and 12 times faster than before, while the language itself and the tsc command stay the same.
How TypeScript works
Types are annotations, not runtime code. You describe the shape of data with type annotations, interfaces and type aliases. The compiler checks every use against those descriptions and reports mismatches. When it emits JavaScript, the types are removed; nothing about them exists at runtime.
Inference does most of the work. You rarely write types for every variable. TypeScript infers them from values and return types, so const total = price * quantity is known to be a number without an annotation. Explicit types are mostly needed at boundaries such as function parameters and API responses.
Structural typing. TypeScript compares types by their shape, not their name. Any object that has the required properties fits an interface, whether or not it was declared with it. This matches how JavaScript code is actually written.
Gradual adoption. A project can start with loose settings and plain .js files, then tighten the rules over time. The strict option turns on the full set of checks, including strict null checks, which catch the classic "cannot read property of undefined" error before it happens.
Typed libraries. Most popular npm packages ship their own type declarations. For the rest, the community-maintained DefinitelyTyped project publishes them under @types, so even plain JavaScript libraries get autocomplete and checks.
Key features
- Static type checking that catches type errors, typos and wrong arguments while you write code.
- Editor support: accurate autocomplete, go-to-definition, safe renaming and refactoring in VS Code and other editors, powered by the TypeScript language service.
- Rich type system with union and intersection types, generics, literal types, mapped and conditional types.
- Modern JavaScript features compiled down to older targets when needed.
- Declaration files (
.d.ts) that describe the types of existing JavaScript code. - Runs everywhere JavaScript does: browsers, Node.js, Deno and Bun, the last two of which run TypeScript files directly.
Where TypeScript is used
- Front-end applications with React, Next.js, Vue or Angular, where components pass typed props and state.
- Backend services on Node.js with frameworks such as NestJS, Express or Fastify.
- Full-stack applications that share types between the API and the client, so a change on one side shows up as a compile error on the other.
- Libraries and SDKs, where types document the public API for every user.
- Mobile and desktop apps built with React Native or Electron.
- Infrastructure as code with tools such as Pulumi and the AWS CDK.
When to choose TypeScript, and when not to
Choose TypeScript when:
- The codebase will grow beyond a few files or live for more than a few months.
- Several developers or teams work on it, and the code has to explain itself.
- Front end and back end are both JavaScript and you want to share data models between them.
- You refactor often and want the compiler to find every place a change affects.
Think twice when:
- It is a short script, a prototype that will be thrown away, or a small page with a little interactivity. The setup may cost more than it saves.
- The team is new to typed languages and the deadline is close. Start with loose settings rather than
stricteverywhere. - You expect types to validate data at runtime. They do not; input from users and APIs still needs runtime validation with a library such as Zod.
The honest costs are a build step, longer compile times on very large projects (the problem TypeScript 7 targets) and a learning curve for advanced types. Most teams find that the bugs prevented and the safer refactoring outweigh them.
TypeScript and its alternatives
| Option | Type checking | Best fit |
|---|---|---|
| TypeScript | Static, compile-time, gradual | Most medium and large JavaScript codebases |
| JavaScript | None | Small scripts and quick prototypes |
| JavaScript + JSDoc | Type comments checked by the TypeScript compiler | Projects that want checks without a build step |
| Flow | Static, from Meta | Codebases that already use it |
| Dart | Static, own language and runtime | Flutter apps |
The question people ask most is TypeScript vs JavaScript. It is not a choice between two languages: TypeScript is JavaScript plus types and a compiler. The output is the same JavaScript; what changes is how many mistakes reach it. JSDoc type comments are a lighter middle ground that the TypeScript compiler can check, and the specification behind both is ECMAScript.
How we use TypeScript at Internative
We use TypeScript to build applications where long-term maintainability and code quality matter. It makes development safer when several teams work on the same complex project, because the types document the code and the compiler checks every change.
Two of our published customer stories use it:
- Nevados, a platform that builds audit workpapers straight from the trial balance, has a Next.js, React and TypeScript front end with shadcn/ui and Tailwind CSS, backed by .NET, MongoDB, Python and a self-hosted language model.
- Mesaim, the time and task management portal we built for NewMind.ai, pairs a Flutter app with a Node.js and TypeScript backend using Micro ORM, PostgreSQL and Redis on AWS.
If you are planning a web application or a SaaS product on a JavaScript stack, our web application development team can help you set up a TypeScript codebase that stays maintainable as it grows.
Frequently asked questions
What is the difference between TypeScript and JavaScript?
TypeScript is JavaScript with static types. You write the same code, add type annotations where they help, and the compiler checks them before turning the code into plain JavaScript. JavaScript finds type mistakes only when the code runs; TypeScript finds most of them while you write it.
Is TypeScript a frontend or backend language?
Both. TypeScript compiles to JavaScript, so it runs wherever JavaScript does: in the browser for front-end frameworks such as React, Vue and Angular, and on the server with Node.js, Deno or Bun. Many teams use it on both sides and share types between them.
Is TypeScript similar to Java?
Only on the surface. Both have classes, interfaces and generics, and Java or C# developers usually find TypeScript familiar. Underneath they differ: TypeScript types are erased at compile time and compared by structure, the runtime is JavaScript, and functions and plain objects are used far more than class hierarchies.
When was TypeScript first released?
Microsoft released TypeScript publicly on 1 October 2012, at version 0.8. Version 1.0 followed in April 2014. TypeScript 7.0, a native rewrite of the compiler in Go, was released in July 2026.
Is TypeScript still relevant?
Yes. It is the default for most new JavaScript projects of any size, major frameworks are written in it or recommend it, and it is now the most used language on GitHub by contributor count. The move to a native Go compiler in version 7.0 addresses its main weak point, build speed on large codebases.
Keep reading
The articles that follow this one.



