mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Go to definition: pass unverified through server (#43483)
* Pass `unverified` through server * Update protocol baseline * Fix unit tests * Fix other tests
This commit is contained in:
@@ -1013,7 +1013,7 @@ namespace ts.server.protocol {
|
||||
* Definition response message. Gives text range for definition.
|
||||
*/
|
||||
export interface DefinitionResponse extends Response {
|
||||
body?: FileSpanWithContext[];
|
||||
body?: DefinitionInfo[];
|
||||
}
|
||||
|
||||
export interface DefinitionInfoAndBoundSpanResponse extends Response {
|
||||
|
||||
@@ -1224,6 +1224,7 @@ namespace ts.server {
|
||||
containerName: info.containerName,
|
||||
kind: info.kind,
|
||||
name: info.name,
|
||||
...info.unverified && { unverified: info.unverified },
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1300,8 +1301,8 @@ namespace ts.server {
|
||||
}));
|
||||
}
|
||||
|
||||
private mapDefinitionInfo(definitions: readonly DefinitionInfo[], project: Project): readonly protocol.FileSpanWithContext[] {
|
||||
return definitions.map(def => this.toFileSpanWithContext(def.fileName, def.textSpan, def.contextSpan, project));
|
||||
private mapDefinitionInfo(definitions: readonly DefinitionInfo[], project: Project): readonly protocol.DefinitionInfo[] {
|
||||
return definitions.map(def => ({ ...this.toFileSpanWithContext(def.fileName, def.textSpan, def.contextSpan, project), ...def.unverified && { unverified: def.unverified } }));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user