Skip to content

Show references code lens on export assignments in native language server - #65426

Open
k1tbyte wants to merge 1 commit into
microsoft:mainfrom
k1tbyte:codelens-export-assignment
Open

k1tbyte wants to merge 1 commit into
microsoft:mainfrom
k1tbyte:codelens-export-assignment

Conversation

@k1tbyte

@k1tbyte k1tbyte commented Nov 10, 2026

Copy link
Copy Markdown

Fixes #65425

Show the references code lens on export default <expr> and export = by treating export assignments as valid reference lens nodes in the native language server. This matches the 6.0 behavior.

Added fourslash test codeLensExportAssignment01 with a baseline.

AI disclosure: AI was used to help write the tests.

Copilot AI balanced review requested due to automatic review settings November 10, 2026 10:46
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Nov 10, 2026
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 10, 2026
@k1tbyte

k1tbyte commented Nov 10, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the changes restoring reference code lenses for identifier-based export assignments.

No open issues 🎉

What changed in this PR

Restores reference code lenses for identifier-based export default and export = assignments in the native language server, addressing #65425 and matching TypeScript 6.0 behavior.

Changes:

  • Recognizes export assignments as reference-lens nodes when their expression is an identifier.
  • Anchors lenses to declaration names, including exported identifiers.
  • Adds fourslash coverage and a baseline for default exports, export-equals assignments, and exclusion of literal expressions.
File Description
tsc/​testdata/​baselines/​reference/​fourslash/​codeLenses/​codeLensExportAssignment01.baseline.jsonc Records expected lens positions and reference counts.
tsc/​internal/​ls/​codelens.go Enables identifier export-assignment lenses and updates range selection.
tsc/​internal/​fourslash/​tests/​codeLensExportAssignment01_test.go Adds regression coverage for export-assignment code lenses.

Review effort: Balanced

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

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

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

References code lens missing on export default in the native language server

2 participants