Skip to content

Explain labeled tuple elements in the Handbook - #3725

Open
anlonely wants to merge 1 commit into
microsoft:v2from
anlonely:docs/handbook-labeled-tuple-elements
Open

anlonely wants to merge 1 commit into
microsoft:v2from
anlonely:docs/handbook-labeled-tuple-elements

Conversation

@anlonely

@anlonely anlonely commented Dec 5, 2026

Copy link
Copy Markdown

Fixes #3724.

The Tuple Types section now uses labels in its existing destructuring example. It explains what readers see in editor hints, why the underlying tuple still accepts the same values, and when mixing labeled and unlabeled elements became valid.

I checked the mixed-label example with TypeScript 5.1.6 (TS5084), 5.2.2 and 6.0.3 (accepted). The edited code block also passed the site's Twoslash checks. The full Object Types page check exited successfully and produced the same diagnostics in unrelated examples on the base and the change.

Prepared and verified with OpenAI Codex on behalf of anlonely.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handbook doesn't cover labeled tuple elements

1 participant