@@ -456,7 +456,7 @@ namespace ts.projectSystem {
456456 function protocolFileLocationFromSubstring(file: File, substring: string): protocol.FileLocationRequestArgs {
457457 return { file: file.path, ...protocolLocationFromSubstring(file.content, substring) };
458458 }
459- function protocolFileSpanFromSubstring(file: File, substring: string, options?: SpanFromSubstringOptions) {
459+ function protocolFileSpanFromSubstring(file: File, substring: string, options?: SpanFromSubstringOptions): protocol.FileSpan {
460460 return { file: file.path, ...protocolTextSpanFromSubstring(file.content, substring, options) };
461461 }
462462 function documentSpanFromSubstring(file: File, substring: string, options?: SpanFromSubstringOptions): DocumentSpan {
@@ -8287,7 +8287,8 @@ namespace ts.projectSystem {
82878287 protocolTextSpanFromSubstring(aFile.content, "C"),
82888288 protocolTextSpanFromSubstring(aFile.content, "C", { index: 1 }),
82898289 ];
8290- const cLocs: protocol.TextSpan[] = [protocolTextSpanFromSubstring(cFile.content, "C")];
8290+ const span = protocolTextSpanFromSubstring(cFile.content, "C");
8291+ const cLocs: protocol.TextSpan[] = [span];
82918292 assert.deepEqual<protocol.RenameResponseBody | undefined>(response, {
82928293 info: {
82938294 canRename: true,
@@ -8296,6 +8297,7 @@ namespace ts.projectSystem {
82968297 kind: ScriptElementKind.constElement,
82978298 kindModifiers: ScriptElementKindModifier.exportedModifier,
82988299 localizedErrorMessage: undefined,
8300+ triggerSpan: span,
82998301 },
83008302 locs: [
83018303 { file: aFc, locs: cLocs },
@@ -10063,6 +10065,7 @@ declare class TestLib {
1006310065 kind: ScriptElementKind.alias,
1006410066 kindModifiers: ScriptElementKindModifier.none,
1006510067 localizedErrorMessage: undefined,
10068+ triggerSpan: protocolTextSpanFromSubstring(userTs.content, "fnA", { index: 1 }),
1006610069 },
1006710070 locs: [renameUserTs(userTs), renameATs(aTs)],
1006810071 });
@@ -10081,6 +10084,7 @@ declare class TestLib {
1008110084 kind: ScriptElementKind.functionElement,
1008210085 kindModifiers: ScriptElementKindModifier.exportedModifier,
1008310086 localizedErrorMessage: undefined,
10087+ triggerSpan: protocolTextSpanFromSubstring(aTs.content, "fnA"),
1008410088 },
1008510089 locs: [renameATs(aTs), renameUserTs(userTs)],
1008610090 });
@@ -10109,6 +10113,7 @@ declare class TestLib {
1010910113 kind: ScriptElementKind.alias,
1011010114 kindModifiers: ScriptElementKindModifier.none,
1011110115 localizedErrorMessage: undefined,
10116+ triggerSpan: protocolTextSpanFromSubstring(userTs.content, "fnB", { index: 1 }),
1011210117 },
1011310118 locs: [
1011410119 {
0 commit comments