copilot-swe-agent[bot] 649c90af15 Fix contextual typing sensitivity to binding pattern structure
Modified getTypeFromArrayBindingPattern to make contextual type construction
agnostic to whether tuple destructuring elements have binding names. When
includePatternInType is true, cap minLength at 2 to ensure consistent
contextual types regardless of binding pattern variations.

This fixes an issue where [, , t] and [, s, ] produced different contextual
types, causing inconsistent generic type inference and spurious excess
property errors.

Addresses feedback in #41548 about making contextual types position-agnostic.

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2025-07-29 00:01:39 +00: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.

Description
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
Readme 5.3 GiB
2025-07-30 13:28:01 -05:00
Languages
TypeScript 98%
jsonc 1.9%
JavaScript 0.1%