-
Notifications
You must be signed in to change notification settings - Fork 763
Open
Labels
Domain: EditorRelated to the LSP server, editor experienceRelated to the LSP server, editor experience
Description
VS Code Editor Issue
Extension Version: 0.20251203.1
VS Code Version: 1.106.3
Operating System: Windows 11 Pro 24H2 (Build 26100.7171)
Steps to Reproduce
- Create two files as shown below (or clone the minimal reproduction repository)
- Open VS Code with TypeScript Go Native enabled
- Open
index.ts - Place cursor on
onDidChangeContentin line 5:documents!.onDidChangeContent() - Execute "Go to Definition" (F12)
index.ts
import { TextDocuments } from "./type";
var documents: TextDocuments;
documents!.onDidChangeContent()
// ^ Go to Definition heretype.d.ts
export interface Event {
(): any;
}
export declare class TextDocuments {
get onDidChangeContent(): Event;
}Minimal reproduction repository: https://github.com/imbant/ts-go-definition-bug
Issue
Expected Behavior (Strada / JS Language Server)
Returns 2 definition locations:
interface Eventcallable signature (line 2 intype.d.ts)get onDidChangeContent()getter definition (line 6 intype.d.ts)
Actual Behavior (TypeScript Go Native)
Returns only 1 definition location:
interface Eventcallable signature
❌ Missing: The getter get onDidChangeContent(): Event definition
Analysis
The property onDidChangeContent is a getter that returns a callable interface (Event). When the code is documents!.onDidChangeContent():
onDidChangeContentaccesses the getter()invokes the callable interface returned by the getter
"Go to Definition" should return both:
- The callable interface signature being invoked
- The getter property that provides this value
Copilot
Metadata
Metadata
Assignees
Labels
Domain: EditorRelated to the LSP server, editor experienceRelated to the LSP server, editor experience