Languages and formats
TypeScript
Summary
TypeScript is a free, open-source programming language from Microsoft that adds optional types to JavaScript and checks code for mistakes before it runs. The types are removed before the code is used, leaving plain JavaScript for browsers and servers. Microsoft announced it on October 1, 2012, and released version 1.0 on April 2, 2014. In 2026 Microsoft moved the compiler to native code with TypeScript 7.0.
What TypeScript is
TypeScript is a programming language from Microsoft that adds types to JavaScript. Its official site sums it up as “JavaScript with syntax for types.”1 A type is a label that says what kind of value something holds, such as a number, a piece of text or a date.
The TypeScript handbook calls the language a typed superset of JavaScript: any valid JavaScript syntax is also valid TypeScript, and TypeScript adds rules about how values may be used.2 Its main job is to act as a static type checker, a tool that looks for mistakes in a program before it runs, based on the kinds of values the code works with.2
Browsers cannot run TypeScript directly.3 Before the code is used, the type annotations are removed and what is left is ordinary JavaScript, which runs wherever JavaScript runs: in a web browser, on Node.js, Deno or Bun.1 The handbook says TypeScript “never changes the runtime behavior” of JavaScript code and adds no runtime library of its own.2
The handbook gives a small example. A program describes a shape with a width of 10 and a height of 15, then misspells height as “heigth” while working out the area. TypeScript reports that the property does not exist and asks: “Did you mean ‘height’?”2
As of October 22, 2026, the newest stable version is TypeScript 7.0.2, dated August 20, 2026, on the project’s GitHub releases page.4 A beta of version 7.1 followed on October 20, 2026.5
How TypeScript works
A developer adds annotations where they help. The handbook’s example function says it takes a person’s name as a string and a Date object. Calling it with text where the date should be produces an error that a string is not assignable to Date.3
Annotations are often unnecessary because TypeScript works out types itself, a feature called type inference. If a line sets a variable to the text “hello there,” TypeScript already knows it is a string, and the handbook advises not adding a label in such cases.3
The compiler
The tool that checks and converts TypeScript is the compiler, run as the command tsc. The handbook installs it through npm, the JavaScript package registry, and shows tsc turning a file called hello.ts into hello.js.3
By default tsc still writes the JavaScript file when it finds type errors, so a team moving an existing JavaScript project can keep it running while it fixes them. A setting called noEmitOnError stops output until the errors are gone.3 The compiler can also rewrite newer JavaScript syntax into older forms for older browsers, a step the handbook calls downleveling, controlled by the target setting.3
Project settings usually live in a file named tsconfig.json, a JSON file.6 The strict setting switches on a group of stricter checks.3 Two of them matter most, according to the handbook: noImplicitAny, which flags values whose type would silently fall back to “any,” and strictNullChecks, which forces code to handle missing values such as null and undefined.3 Since TypeScript 6.0, strict is on by default.6
Declaration files and DefinitelyTyped
Most JavaScript on the web was not written in TypeScript, so the language needs a way to describe code that already exists. Declaration files, which end in .d.ts, hold only type descriptions. Microsoft’s 2012 announcement presented them as a way to describe libraries such as jQuery and the DOM, the browser’s model of a page’s HTML, without changing those libraries.7
A community project called DefinitelyTyped collects declaration files for JavaScript libraries that do not ship their own. Its GitHub repository is published automatically to the @types scope on npm, so a developer installs, for example, @types/node to describe Node.js.8 Since TypeScript 2.0, released on September 22, 2016, the compiler finds these @types packages on its own.9
Features that are more than types
A few TypeScript features change what the program does, so they cannot simply be deleted. The TypeScript team lists enums, namespaces and parameter properties as features with runtime behavior.10 Node.js’s documentation recommends a setting called erasableSyntaxOnly, available from TypeScript 5.8, for projects that want to avoid them.11
TypeScript also understands JSX, the HTML-like syntax used by React. React’s documentation says every file containing JSX must use the .tsx extension, and type descriptions for React come from the @types/react and @types/react-dom packages.12
Origins at Microsoft, 2012 to 2014
Microsoft announced TypeScript on October 1, 2012. Microsoft executive S. Somasegar wrote that it solved “a very specific problem,” getting JavaScript development to scale to large applications.7 His post stressed that “all JavaScript code is already TypeScript code,” that types were optional, and that the compiler’s output was standards-compliant JavaScript for any browser, host or operating system.7
The post linked a video introduction by Anders Hejlsberg.7 Visual Studio Magazine described him as a primary force behind the language and noted that he had earlier helped create C#, Delphi and Turbo Pascal.13 Microsoft later described Hejlsberg as a Technical Fellow and the lead architect of TypeScript.14
From the start the project was open. The compiler was published on CodePlex, Microsoft’s code-hosting site of the time, under the Apache 2.0 license, and the language specification under the Open Web Foundation’s OWFa 1.0 agreement.7 Microsoft also released a plugin for Visual Studio 2012 and an online playground for trying the language in a browser.7
Some of the new syntax followed work already under way on JavaScript itself. Somasegar wrote that TypeScript’s classes and modules aligned with proposals for ECMAScript 6.7 ECMAScript is the name of the formal JavaScript standard.15
The first release was version 0.8, in October 2012.16 Version 0.8.1 followed on November 15, 2012, adding source maps, files that link the generated JavaScript back to the original TypeScript lines so developers can debug the code they wrote.17
TypeScript 1.0 was announced on April 2, 2014. It shipped with the Visual Studio 2013 Spring Update and was also available from npm, and the team said it would start accepting pull requests, code contributions from outside Microsoft.16 The post reported codebases that already exceeded half a million lines of TypeScript.16
On July 21, 2014, the team moved the source code, issue tracker and wiki from CodePlex to GitHub and previewed a rewritten compiler that, in early tests, compiled real-world code five times faster.18 As of October 22, 2026, the GitHub repository is still under the Apache 2.0 license and shows about 111,000 stars, the site’s bookmark count.19
From a Microsoft project to a common tool
A turning point came on March 5, 2015, when Microsoft announced that Angular 2, the next version of the Angular web framework, would be built with TypeScript after a months-long partnership with the Angular team.20 The collaboration added metadata annotations to class declarations, which let library and app authors attach descriptive information to classes, building on a decorator proposal that Yehuda Katz helped design.20
Later releases made the checks stricter and the tooling easier:
- TypeScript 2.0 (September 22, 2016) added non-nullable types through strictNullChecks, smarter control flow analysis and the @types system for declaration files.9
- TypeScript 4.0 (August 20, 2020) arrived as the package passed 50 million monthly npm downloads, first reached in July 2020, according to Microsoft.21
- TypeScript 5.0 (March 16, 2023) implemented the new decorators standard and moved the compiler’s own code to JavaScript modules, which cut the npm package from 63.8 MB to 37.4 MB. Microsoft said most codebases would build 10% to 20% faster.22
How widely it is used
Measures of popularity depend on how they count. GitHub’s Octoverse report, published on October 28, 2025, found that in August 2025 TypeScript became the most used language on GitHub for the first time, counted by monthly contributors.23 It had 2,636,006 contributors that month, up 66.6% in a year and about 42,000 ahead of Python, while JavaScript fell to third with 2.15 million.23 GitHub noted that other indexes use different methods and may still rank JavaScript and Python higher.23
Stack Overflow’s 2026 Developer Survey, with 30,903 responses from 169 countries, shows a different picture.24 There JavaScript was the most used language, at 62.0% of respondents, and TypeScript was sixth, at 43.8%.25 A year earlier, TypeScript was also sixth, at 43.6%.26
Running TypeScript without a build step
TypeScript code normally passes through the compiler before it runs.3 Some JavaScript runtimes now remove the types themselves.
Node.js 22.6.0, released on August 6, 2024, added an experimental flag, –experimental-strip-types, that removes inline type annotations from .ts files so they can run.27 Node.js 23.6.0, released on January 7, 2025, turned the feature on by default, so a command such as node file.ts works without extra setup.28 Node.js 25.2.0, released on November 11, 2025, marked type stripping as stable.29
Node.js replaces the TypeScript syntax with blank space and performs no type checking. Its documentation lists limits: features that need code generation, such as enums, raise an error; .tsx files are not supported; and Node.js refuses to handle TypeScript inside the node_modules folder of installed packages.11 The parser it uses is built on WebAssembly, and Node.js has no fallback without it.11
Deno, another JavaScript runtime, runs TypeScript files directly and treats tsconfig.json as optional. Its run command also skips type checking by default; a separate deno check command runs the compiler without executing the program.30
Types in JavaScript itself
On March 9, 2022, the TypeScript team announced support for a proposal to add optional type syntax to JavaScript. Engines would ignore the types, which would “effectively act as comments,” and checking would stay in editors and build tools.10 The proposal went to TC39, the Ecma committee that writes the ECMAScript specification.3132
As of October 22, 2026, the proposal’s repository lists it at Stage 1, an early step in a six-stage process,31 with Daniel Rosenwasser of Microsoft, Romulo Cintra of Igalia and Rob Palmer of Bloomberg as champions. The repository warns that its text “has not been updated regularly.”32
The native compiler: TypeScript 6.0 and 7.0
Through version 6.0 the TypeScript compiler ran on a JavaScript-based codebase.614 On March 11, 2025, Hejlsberg announced a port of the compiler and its tools to native code, written in the Go programming language, under the code name Corsa.14 The original codebase is code-named Strada, and the new code lives in a separate repository, microsoft/typescript-go, under the same license.14
The announcement predicted that the port would “reduce most build times by 10x.” Its benchmarks showed the Visual Studio Code codebase compiling in 7.5 seconds instead of 77.8 seconds, and the editor loading that project in about 1.2 seconds instead of 9.6.14 Explaining the choice of language, team member Ryan Cavanaugh wrote that “idiomatic Go strongly resembles the existing coding patterns” of the TypeScript codebase, which made it easier to port the code and keep the two versions in step.33
Microsoft planned two version lines. The JavaScript-based compiler would continue as TypeScript 6.x, and the native one would ship as TypeScript 7.0.14
TypeScript 6.0, announced on March 23, 2026, was described as “the last release based on the current JavaScript codebase” and as a bridge to 7.0.6 It changed several defaults, including turning strict on, and deprecated older options such as compiling to ES5, which were to be removed entirely in 7.0.6
TypeScript 7.0, announced on July 8, 2026, is the native Go port. Microsoft reported full builds typically 8 to 12 times faster than TypeScript 6.0: the Visual Studio Code codebase took 10.6 seconds instead of 125.7, and memory use was lower in every project it listed.34 The 2025 and 2026 posts give different timings for the same Visual Studio Code codebase, measured more than a year apart.1434
Version 7.0 shipped without a programmatic API, the interface other tools use to run the compiler from their own code. Microsoft said version 6.0 remains available for tools that need one, such as typescript-eslint, and that projects using Vue, Svelte, Astro or MDX, whose tools embed TypeScript through that API, should stay on 6.0 for now. The two versions can be installed side by side.34 The 7.1 beta of October 20, 2026, introduced a preview of the new API, and its benchmarks showed type checking 1.2 to 1.9 times faster than 7.0 on the five projects listed.5 It also lets declarations describe files imported with attributes such as type “css”, for projects that import CSS files from JavaScript.5
Timeline
- TypeScript 7.1 beta previews the native compiler's new API5
- TypeScript 7.0.2 is the newest stable release4
- TypeScript 7.0, the native Go port, is announced34
- TypeScript 6.0, the last JavaScript-based version, is released6
- Node.js 25.2.0 marks type stripping as stable29
- TypeScript becomes the most used language on GitHub by monthly contributors23
- Anders Hejlsberg announces the native port of the compiler to Go14
- Node.js 23.6.0 runs TypeScript files by default28
- The TypeScript team backs a proposal to add type syntax to JavaScript10
- TypeScript 4.0 is released, after topping 50 million monthly npm downloads21
- TypeScript 2.0 adds strict null checks and @types packages9
- Microsoft announces that Angular 2 will be built with TypeScript20
- TypeScript moves from CodePlex to GitHub18
- TypeScript 1.0 is released16
- Microsoft announces TypeScript, a typed superset of JavaScript7
What it means for your website
TypeScript is a tool for the people who write a site’s code. Visitors never download it: the types are removed before the code is published, and TypeScript adds no runtime library, so the browser receives plain JavaScript.2 On a hosted website builder such as Squarespace or Wix you will not see it at all.
- Know what .ts and .tsx files are. If a developer or an AI builder hands you a project with these files, the code is TypeScript (with JSX in .tsx files). It needs a build step to produce JavaScript, because browsers cannot run TypeScript directly.312 Our guide to AI website builders and the glossary entry on vibe coding cover what to ask for when you take code away from such a tool.
- Ask whether types are actually checked. Some tools remove types without checking them. Node.js and Deno both run TypeScript without type checking unless told to.1130 WordPress‘s @wordpress/scripts build package compiles .ts and .tsx files with Babel and webpack.35 For paid custom work, ask that a check such as tsc or deno check runs before every release.
- Custom WordPress blocks can be written in TypeScript. The @wordpress/scripts package accepts TypeScript entry files.35 That matters only if you commission a custom block or plugin; ready-made themes and plugins are installed as they come. Our WordPress review covers the rest of the stack.
- Plan for the 7.0 change. TypeScript 7.0 turns options deprecated in 6.0 into hard errors, and Microsoft names the new defaults for the rootDir and types settings as the changes most likely to surprise.34 If a developer maintains a TypeScript project for you, ask whether it has been tested on 7.0 or deliberately kept on 6.0.
- You do not need it for a simple site. A brochure site with a few pages of HTML and a contact form gains little from a type checker. Microsoft pitched TypeScript at “application scale” JavaScript, meaning large codebases.7
See also
References
- TypeScript: JavaScript with syntax for types. Microsoft (typescriptlang.org). accessed October 22, 2026.
- TypeScript for the New Programmer. TypeScript Handbook, Microsoft (typescriptlang.org). accessed October 22, 2026.
- The Basics. TypeScript Handbook, Microsoft (typescriptlang.org). accessed October 22, 2026.
- Releases: microsoft/TypeScript. GitHub. accessed October 22, 2026.
- Announcing TypeScript 7.1 Beta (Daniel Rosenwasser). TypeScript blog, Microsoft. 2026-10-20. accessed October 22, 2026.
- Announcing TypeScript 6.0 (Daniel Rosenwasser). TypeScript blog, Microsoft. 2026-03-23. accessed October 22, 2026.
- TypeScript: JavaScript Development at Application Scale (S. Somasegar). Somasegar's blog, Microsoft (archived on Microsoft Learn). 2012-10-01. accessed October 22, 2026.
- DefinitelyTyped: the repository for high quality TypeScript type definitions. GitHub. accessed October 22, 2026.
- Announcing TypeScript 2.0 (Daniel Rosenwasser). TypeScript blog, Microsoft. 2016-09-22. accessed October 22, 2026.
- A Proposal For Type Syntax in JavaScript (Daniel Rosenwasser). TypeScript blog, Microsoft. 2022-03-09. accessed October 22, 2026.
- Modules: TypeScript. Node.js documentation, OpenJS Foundation. accessed October 22, 2026.
- Using TypeScript. React documentation (react.dev). accessed October 22, 2026.
- TypeScript Enables JavaScript Scaling (Keith Ward). Visual Studio Magazine. 2012-10-02. accessed October 22, 2026.
- A 10x Faster TypeScript (Anders Hejlsberg). TypeScript blog, Microsoft. 2025-03-11. accessed October 22, 2026.
- JavaScript. MDN Web Docs (Mozilla). accessed October 22, 2026.
- Announcing TypeScript 1.0 (Jonathan Turner). TypeScript blog, Microsoft. 2014-04-02. accessed October 22, 2026.
- Announcing TypeScript 0.8.1 (Luke Hoban). TypeScript blog, Microsoft. 2012-11-15. accessed October 22, 2026.
- New Compiler and Moving to GitHub (Jonathan Turner). TypeScript blog, Microsoft. 2014-07-21. accessed October 22, 2026.
- microsoft/TypeScript. GitHub. accessed October 22, 2026.
- Angular 2: Built on TypeScript (Luke Hoban). TypeScript blog, Microsoft. 2015-03-05. accessed October 22, 2026.
- Announcing TypeScript 4.0 (Daniel Rosenwasser). TypeScript blog, Microsoft. 2020-08-20. accessed October 22, 2026.
- Announcing TypeScript 5.0 (Daniel Rosenwasser). TypeScript blog, Microsoft. 2023-03-16. accessed October 22, 2026.
- Octoverse: A new developer joins GitHub every second as AI leads TypeScript to #1. GitHub Staff, The GitHub Blog. 2025-10-28. accessed October 22, 2026.
- 2026 Stack Overflow Developer Survey. Stack Overflow. 2026. accessed October 22, 2026.
- 2026 Stack Overflow Developer Survey: Technology. Stack Overflow. 2026. accessed October 22, 2026.
- 2025 Stack Overflow Developer Survey: Technology. Stack Overflow. 2025. accessed October 22, 2026.
- Node.js v22.6.0 (Current). Node.js blog, OpenJS Foundation. 2024-08-06. accessed October 22, 2026.
- Node.js v23.6.0 (Current). Node.js blog, OpenJS Foundation. 2025-01-07. accessed October 22, 2026.
- Node.js v25.2.0 (Current). Node.js blog, OpenJS Foundation. 2025-11-11. accessed October 22, 2026.
- TypeScript support. Deno documentation. accessed October 22, 2026.
- The TC39 Process. Ecma TC39. accessed October 22, 2026.
- ECMAScript proposal: Type Annotations (tc39/proposal-type-annotations). GitHub. accessed October 22, 2026.
- Why Go? (Ryan Cavanaugh, microsoft/typescript-go discussion 411). GitHub. 2025-03. accessed October 22, 2026.
- Announcing TypeScript 7.0 (Daniel Rosenwasser). TypeScript blog, Microsoft. 2026-07-08. accessed October 22, 2026.
- @wordpress/scripts. Block Editor Handbook, WordPress Developer Resources. accessed October 22, 2026.
Web Building Encyclopedia. First published October 22, 2026. Last reviewed October 22, 2026. Every fact on this page is linked to a source we opened. Spotted an error? Write to [email protected].