Jake Bailey ed71185c27 Unify recursive type naming during serialization
Recursive values can have valid declaration types without annotations.
Separate function and alias fallbacks leave equivalent constructs with
different results, and broader value annotations can silently weaken
the recursive type.

Keep ordinary type names independent of the definitions being emitted.
Share definition context across syntax reuse and structural expansion
so recursive references and cycle detection agree on what is in scope.
A value self-reference must cross a lazy resolution boundary, and names
usable in local displays are not necessarily usable in declarations.

Starting from a selected signature must not add an extra recursive
unfolding merely because its containing type was not traversed.
Preserve isolated declaration inference restrictions and prevent cached
output from crossing incompatible recursion contexts.

Captured generic substitutions must not escape into parameters bound
by a re-entered signature. Otherwise declaration consumers lose valid
calls even when the original source infers the correct result.

Fixes 55832
2026-10-23 15:07:16 -07:00
2026-09-16 22:16:38 +00:00
2026-08-24 19:36:10 +00:00
2026-09-16 22:16:38 +00:00
2026-09-17 15:55:09 +00:00
2026-09-16 22:16:38 +00:00
2026-09-16 22:16:38 +00:00
2023-10-05 10:36:20 -07:00

TypeScript

CI npm version Downloads OpenSSF Scorecard

TypeScript is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the playground, and stay up to date via our blog and Twitter account.

Find others who are using TypeScript at our community page.

Installing

For the latest stable version:

npm install -D typescript

For our nightly builds:

npm install -D typescript@next

Contribute

There are many ways to contribute to TypeScript.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Roadmap

For details on our planned features and future direction, please refer to our roadmap.

Languages
TypeScript 50.5%
Go 37.7%
JSON 11.5%
JavaScript 0.3%