Skip to content

Expose labeled tuple element declarations in the TypeScript 7 API - #64109

Draft
Andrew Branch (andrewbranch) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-labeled-element-declarations
Draft

Expose labeled tuple element declarations in the TypeScript 7 API#64109
Andrew Branch (andrewbranch) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-labeled-element-declarations

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

TypeScript 7 did not expose tuple element labels through TupleType, preventing API consumers from recovering foo and bar from:

function gh1449<T extends [foo: any, bar?: any]>(a: T): T;
  • API

    • Adds TupleType.labeledElementDeclarations.
    • Represents declarations as project-scoped NodeHandle<NamedTupleMember | ParameterDeclaration> values.
  • Protocol

    • Serializes labeled declarations only on tuple targets.
    • Preserves undefined entries for partially labeled tuples.
  • Coverage

    • Exercises label retrieval and node resolution through both async and sync APIs.

@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 31, 2026
Copilot AI linked an issue Aug 31, 2026 that may be closed by this pull request
1 task
Copilot AI and others added 2 commits August 31, 2026 18:20
Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>
Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing labeledElementDeclarations in TypeScript 7 Expose labeled tuple element declarations in the TypeScript 7 API Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[API] labeledElementDeclarations is missing in TypeScript 7

2 participants