();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "barReference", "fooReference")
+ f.VerifyBaselineGoToDefinition(t, false, "barReference", "fooReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionIndexSignature2_test.go b/internal/fourslash/tests/gen/goToDefinitionIndexSignature2_test.go
index e851516382..5403b58416 100644
--- a/internal/fourslash/tests/gen/goToDefinitionIndexSignature2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionIndexSignature2_test.go
@@ -16,5 +16,5 @@ func TestGoToDefinitionIndexSignature2(t *testing.T) {
const o = {};
o.[|/*use*/foo|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use")
+ f.VerifyBaselineGoToDefinition(t, true, "use")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionIndexSignature_test.go b/internal/fourslash/tests/gen/goToDefinitionIndexSignature_test.go
index 1cf112a5dd..d56a427de3 100644
--- a/internal/fourslash/tests/gen/goToDefinitionIndexSignature_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionIndexSignature_test.go
@@ -30,5 +30,5 @@ k.[|/*usea*/a|];
k.[|/*useb*/b|];
k.[|/*useab*/ab|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "useI", "useIJ", "usea", "useb", "useab")
+ f.VerifyBaselineGoToDefinition(t, true, "useI", "useIJ", "usea", "useb", "useab")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionInstanceof1_test.go b/internal/fourslash/tests/gen/goToDefinitionInstanceof1_test.go
index 6f8a5f90ef..0bf6c1d723 100644
--- a/internal/fourslash/tests/gen/goToDefinitionInstanceof1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionInstanceof1_test.go
@@ -16,5 +16,5 @@ func TestGoToDefinitionInstanceof1(t *testing.T) {
declare var obj: any;
obj [|/*start*/instanceof|] C;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionInstanceof2_test.go b/internal/fourslash/tests/gen/goToDefinitionInstanceof2_test.go
index caa38a204e..1d66b01a1c 100644
--- a/internal/fourslash/tests/gen/goToDefinitionInstanceof2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionInstanceof2_test.go
@@ -19,5 +19,5 @@ class C {
declare var obj: any;
obj [|/*start*/instanceof|] C;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionInterfaceAfterImplement_test.go b/internal/fourslash/tests/gen/goToDefinitionInterfaceAfterImplement_test.go
index b7603fbfaa..7b94e788c3 100644
--- a/internal/fourslash/tests/gen/goToDefinitionInterfaceAfterImplement_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionInterfaceAfterImplement_test.go
@@ -22,5 +22,5 @@ class iClass implements /*interfaceReference*/sInt {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "interfaceReference")
+ f.VerifyBaselineGoToDefinition(t, false, "interfaceReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag1_test.go b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag1_test.go
index 44ba7f81a3..d2411d9b58 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag1_test.go
@@ -20,5 +20,5 @@ func TestGoToDefinitionJsDocImportTag1(t *testing.T) {
* @import { A } from [|"./b/*1*/"|]
*/`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag2_test.go b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag2_test.go
index 75cd42c9e3..3dddb6a70b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag2_test.go
@@ -20,5 +20,5 @@ func TestGoToDefinitionJsDocImportTag2(t *testing.T) {
* @import { A } [|from/*1*/|] "./b"
*/`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag3_test.go b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag3_test.go
index 64d6d8fccd..3cdf25492b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag3_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag3_test.go
@@ -20,5 +20,5 @@ func TestGoToDefinitionJsDocImportTag3(t *testing.T) {
* @import { A } [|from /*1*/|] "./b";
*/`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag4_test.go b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag4_test.go
index 4cfae13302..a75af4f618 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag4_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag4_test.go
@@ -20,5 +20,5 @@ export interface /*2*/A { }
* @import { [|A/*1*/|] } from "./b";
*/`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag5_test.go b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag5_test.go
index ef517aa177..00e3a27585 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag5_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsDocImportTag5_test.go
@@ -25,5 +25,5 @@ export interface /*2*/A { }
*/
function f(a) {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsModuleExports_test.go b/internal/fourslash/tests/gen/goToDefinitionJsModuleExports_test.go
index 5fba869159..40d7f77acb 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsModuleExports_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsModuleExports_test.go
@@ -18,5 +18,5 @@ x.[|/*ref*/test|]();
x./*defFn*/test3 = function () { }
x.[|/*refFn*/test3|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "ref", "refFn")
+ f.VerifyBaselineGoToDefinition(t, true, "ref", "refFn")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsModuleNameAtImportName_test.go b/internal/fourslash/tests/gen/goToDefinitionJsModuleNameAtImportName_test.go
index c3088ea9da..6cbe3c5f5b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsModuleNameAtImportName_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsModuleNameAtImportName_test.go
@@ -25,5 +25,5 @@ new [|/*importUsage*/BlahModule|].Blah()
import [|/*importDefTs*/BlahModule|] = require("./foo.js");
new [|/*importUsageTs*/BlahModule|].Blah()`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "importDef", "importUsage", "importDefTs", "importUsageTs")
+ f.VerifyBaselineGoToDefinition(t, true, "importDef", "importUsage", "importDefTs", "importUsageTs")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsModuleName_test.go b/internal/fourslash/tests/gen/goToDefinitionJsModuleName_test.go
index 5feb7b54c1..7c75b15658 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsModuleName_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsModuleName_test.go
@@ -17,5 +17,5 @@ func TestGoToDefinitionJsModuleName(t *testing.T) {
// @Filename: bar.js
var x = require([|/*1*/"./foo"|]);`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsxCall_test.go b/internal/fourslash/tests/gen/goToDefinitionJsxCall_test.go
index 1d15fca89d..d589b832e5 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsxCall_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsxCall_test.go
@@ -19,5 +19,5 @@ interface FC {
const Thing: FC = (props) =>
;
const HelloWorld = () => <[|/**/Thing|] />;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "")
+ f.VerifyBaselineGoToDefinition(t, true, "")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionJsxNotSet_test.go b/internal/fourslash/tests/gen/goToDefinitionJsxNotSet_test.go
index d23e885139..2b63d9381c 100644
--- a/internal/fourslash/tests/gen/goToDefinitionJsxNotSet_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionJsxNotSet_test.go
@@ -21,5 +21,5 @@ export default Foo;
import Foo from './foo';
const a = <[|/*use*/Foo|] />`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use")
+ f.VerifyBaselineGoToDefinition(t, true, "use")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionLabels_test.go b/internal/fourslash/tests/gen/goToDefinitionLabels_test.go
index fea6f06531..44858d4dbf 100644
--- a/internal/fourslash/tests/gen/goToDefinitionLabels_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionLabels_test.go
@@ -20,5 +20,5 @@ func TestGoToDefinitionLabels(t *testing.T) {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1", "2", "3", "4")
+ f.VerifyBaselineGoToDefinition(t, true, "1", "2", "3", "4")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionMember_test.go b/internal/fourslash/tests/gen/goToDefinitionMember_test.go
index 87eb40c675..9b73418938 100644
--- a/internal/fourslash/tests/gen/goToDefinitionMember_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionMember_test.go
@@ -16,5 +16,5 @@ class A {
private z/*z*/: string;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "z")
+ f.VerifyBaselineGoToDefinition(t, true, "z")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionMetaProperty_test.go b/internal/fourslash/tests/gen/goToDefinitionMetaProperty_test.go
index 84bbece66a..76b83ffeff 100644
--- a/internal/fourslash/tests/gen/goToDefinitionMetaProperty_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionMetaProperty_test.go
@@ -18,5 +18,5 @@ function /*functionDefinition*/f() { n/*3*/ew.[|t/*4*/arget|]; }
im/*5*/port.m;
class /*classDefinition*/c { constructor() { n/*6*/ew.[|t/*7*/arget|]; } }`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1", "2", "3", "4", "5", "6", "7")
+ f.VerifyBaselineGoToDefinition(t, true, "1", "2", "3", "4", "5", "6", "7")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionMethodOverloads_test.go b/internal/fourslash/tests/gen/goToDefinitionMethodOverloads_test.go
index 2ced5f4df4..712c45d0d7 100644
--- a/internal/fourslash/tests/gen/goToDefinitionMethodOverloads_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionMethodOverloads_test.go
@@ -27,5 +27,5 @@ var methodOverload = new MethodOverload();
methodOverload.[|/*instanceMethodReference1*/method|]();
methodOverload.[|/*instanceMethodReference2*/method|]("456");`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "staticMethodReference1", "staticMethodReference2", "instanceMethodReference1", "instanceMethodReference2", "staticMethodOverload1", "instanceMethodOverload1")
+ f.VerifyBaselineGoToDefinition(t, true, "staticMethodReference1", "staticMethodReference2", "instanceMethodReference1", "instanceMethodReference2", "staticMethodOverload1", "instanceMethodOverload1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionModifiers_test.go b/internal/fourslash/tests/gen/goToDefinitionModifiers_test.go
index 8c8a7b6493..a87b85890e 100644
--- a/internal/fourslash/tests/gen/goToDefinitionModifiers_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionModifiers_test.go
@@ -27,5 +27,5 @@ func TestGoToDefinitionModifiers(t *testing.T) {
exp/*exportFunction*/ort function foo/*foo*/() { }`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "export", "A", "private", "z", "readonly", "x", "async", "a", "override", "b", "public1", "public2", "multipleModifiers", "c", "exportFunction", "foo")
+ f.VerifyBaselineGoToDefinition(t, true, "export", "A", "private", "z", "readonly", "x", "async", "a", "override", "b", "public1", "public2", "multipleModifiers", "c", "exportFunction", "foo")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionMultipleDefinitions_test.go b/internal/fourslash/tests/gen/goToDefinitionMultipleDefinitions_test.go
index 27bb5cf689..911e1bda0b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionMultipleDefinitions_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionMultipleDefinitions_test.go
@@ -36,5 +36,5 @@ module /*moduleDefinition2*/Module {
// @Filename: e.ts
[|Modul/*moduleReference*/e|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "interfaceReference", "moduleReference")
+ f.VerifyBaselineGoToDefinition(t, true, "interfaceReference", "moduleReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionNewExpressionTargetNotClass_test.go b/internal/fourslash/tests/gen/goToDefinitionNewExpressionTargetNotClass_test.go
index d556c60486..f88abdc9b4 100644
--- a/internal/fourslash/tests/gen/goToDefinitionNewExpressionTargetNotClass_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionNewExpressionTargetNotClass_test.go
@@ -21,5 +21,5 @@ let /*symbolDeclaration*/I2: {
};
new [|/*invokeExpression2*/I2|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "invokeExpression1", "invokeExpression2")
+ f.VerifyBaselineGoToDefinition(t, true, "invokeExpression1", "invokeExpression2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionObjectBindingElementPropertyName01_test.go b/internal/fourslash/tests/gen/goToDefinitionObjectBindingElementPropertyName01_test.go
index dc0cea0530..30e797635f 100644
--- a/internal/fourslash/tests/gen/goToDefinitionObjectBindingElementPropertyName01_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionObjectBindingElementPropertyName01_test.go
@@ -19,5 +19,5 @@ func TestGoToDefinitionObjectBindingElementPropertyName01(t *testing.T) {
var foo: I;
var { [|/*use*/property1|]: prop1 } = foo;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use")
+ f.VerifyBaselineGoToDefinition(t, true, "use")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionObjectLiteralProperties1_test.go b/internal/fourslash/tests/gen/goToDefinitionObjectLiteralProperties1_test.go
index 8bba3b2fc9..1e8028e69e 100644
--- a/internal/fourslash/tests/gen/goToDefinitionObjectLiteralProperties1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionObjectLiteralProperties1_test.go
@@ -23,5 +23,5 @@ bar(true, {
[|pr/*p2*/opx|]: 10
})`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "p1", "p2")
+ f.VerifyBaselineGoToDefinition(t, true, "p1", "p2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionObjectLiteralProperties_test.go b/internal/fourslash/tests/gen/goToDefinitionObjectLiteralProperties_test.go
index 823cbaf910..c8b9d9a69c 100644
--- a/internal/fourslash/tests/gen/goToDefinitionObjectLiteralProperties_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionObjectLiteralProperties_test.go
@@ -25,5 +25,5 @@ o./*setterReference*/setter;
o./*methodReference*/method;
o./*es6StyleMethodReference*/es6StyleMethod;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "valueReference", "getterReference", "setterReference", "methodReference", "es6StyleMethodReference")
+ f.VerifyBaselineGoToDefinition(t, false, "valueReference", "getterReference", "setterReference", "methodReference", "es6StyleMethodReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionObjectSpread_test.go b/internal/fourslash/tests/gen/goToDefinitionObjectSpread_test.go
index 8c16508f5e..e1ae75e52f 100644
--- a/internal/fourslash/tests/gen/goToDefinitionObjectSpread_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionObjectSpread_test.go
@@ -18,5 +18,5 @@ let a2: A2;
let a12 = { ...a1, ...a2 };
a12.[|a/*3*/|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "3")
+ f.VerifyBaselineGoToDefinition(t, true, "3")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverloadsInMultiplePropertyAccesses_test.go b/internal/fourslash/tests/gen/goToDefinitionOverloadsInMultiplePropertyAccesses_test.go
index fc7921af7d..5933239870 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverloadsInMultiplePropertyAccesses_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverloadsInMultiplePropertyAccesses_test.go
@@ -20,5 +20,5 @@ func TestGoToDefinitionOverloadsInMultiplePropertyAccesses(t *testing.T) {
}
A.B.[|/*2*/f|]("");`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "2")
+ f.VerifyBaselineGoToDefinition(t, true, "2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember10_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember10_test.go
index 51292ec5b2..edd63ac123 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember10_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember10_test.go
@@ -22,5 +22,5 @@ class Bar extends Foo {
m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember11_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember11_test.go
index eabda19f48..a8cfcc749b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember11_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember11_test.go
@@ -24,5 +24,5 @@ class Bar extends Foo {
m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1", "2", "3", "4", "5")
+ f.VerifyBaselineGoToDefinition(t, true, "1", "2", "3", "4", "5")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember12_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember12_test.go
index af0a92b515..409224e4cb 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember12_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember12_test.go
@@ -19,5 +19,5 @@ class Bar extends Foo {
static [|/*1*/override|] p = '';
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember13_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember13_test.go
index a74ebda1b0..f872dcc8bd 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember13_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember13_test.go
@@ -19,5 +19,5 @@ class Bar extends Foo {
static [|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember14_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember14_test.go
index d3266b4dd8..59caed4987 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember14_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember14_test.go
@@ -20,5 +20,5 @@ class C extends B {
[|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember15_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember15_test.go
index f9ab7abeab..f4aaece592 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember15_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember15_test.go
@@ -20,5 +20,5 @@ class C extends B {
static [|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember16_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember16_test.go
index b4b1fc4dea..ce7833786e 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember16_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember16_test.go
@@ -24,5 +24,5 @@ export class C extends CompletelyUndefined {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember17_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember17_test.go
index 937ea783ba..9ebb8cb528 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember17_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember17_test.go
@@ -24,5 +24,5 @@ export class MySqlVarBinary extends MySqlColumn {
static [|/*1*/override|] readonly [entityKind]: string = "MySqlVarBinary";
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember18_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember18_test.go
index fc12bc75ab..5d85a2fc1f 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember18_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember18_test.go
@@ -24,5 +24,5 @@ export class MySqlVarBinary extends MySqlColumn {
[|/*1*/override|] readonly [entityKind]: string = "MySqlVarBinary";
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember19_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember19_test.go
index dbbb89c6f1..5824b6ac49 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember19_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember19_test.go
@@ -24,5 +24,5 @@ export class B extends A {
static [|/*1*/override|] readonly [prop] = "B";
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember1_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember1_test.go
index 345846e1dd..6dde000fb2 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember1_test.go
@@ -19,5 +19,5 @@ class Bar extends Foo {
[|/*1*/override|] p = '';
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember20_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember20_test.go
index 37e7b825db..3773ba0f50 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember20_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember20_test.go
@@ -24,5 +24,5 @@ export class B extends A {
[|/*1*/override|] readonly [prop] = "B";
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember21_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember21_test.go
index ae959061de..4d22577a3e 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember21_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember21_test.go
@@ -22,5 +22,5 @@ export class B extends A {
static [|/*1*/override|] readonly [prop] = "B";
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember22_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember22_test.go
index 5f339b2c6c..a2eea9b495 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember22_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember22_test.go
@@ -22,5 +22,5 @@ export class B extends A {
[|/*1*/override|] readonly [prop] = "B";
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember23_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember23_test.go
index c10e72245d..5c885a6546 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember23_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember23_test.go
@@ -24,5 +24,5 @@ export class B extends A {
static [|/*1*/override|] [prop]() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember24_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember24_test.go
index 59a3748668..156083f466 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember24_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember24_test.go
@@ -24,5 +24,5 @@ export class B extends A {
[|/*1*/override|] [prop]() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember25_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember25_test.go
index 9870325c4f..e15bb35a14 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember25_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember25_test.go
@@ -22,5 +22,5 @@ export class B extends A {
static [|/*1*/override|] [prop]() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember26_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember26_test.go
index b727ec1ffd..5ac7569293 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember26_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember26_test.go
@@ -22,5 +22,5 @@ export class B extends A {
[|/*1*/override|] [prop]() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember2_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember2_test.go
index e267cb2330..394b3268ec 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember2_test.go
@@ -20,5 +20,5 @@ class Bar extends Foo {
[|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember3_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember3_test.go
index e72d30c5fb..82bdbc993b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember3_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember3_test.go
@@ -20,5 +20,5 @@ export class Bar extends Foo {
[|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember4_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember4_test.go
index 0145cc7d35..0e6c5fcf2a 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember4_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember4_test.go
@@ -21,5 +21,5 @@ function f () {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember5_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember5_test.go
index bd10ca3fdf..6adb2ecd79 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember5_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember5_test.go
@@ -18,5 +18,5 @@ class Foo extends (class {
[|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember6_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember6_test.go
index 1d577cbda1..9fc6fad97a 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember6_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember6_test.go
@@ -19,5 +19,5 @@ class Bar extends Foo {
[|/*1*/override|] m1() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember7_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember7_test.go
index 559443153e..0dde609939 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember7_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember7_test.go
@@ -16,5 +16,5 @@ class Foo {
[|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember8_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember8_test.go
index 819bc32c6e..94dae65c6a 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember8_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember8_test.go
@@ -22,5 +22,5 @@ class B extends A {
[|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember9_test.go b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember9_test.go
index f23f27682d..e73959daa8 100644
--- a/internal/fourslash/tests/gen/goToDefinitionOverriddenMember9_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionOverriddenMember9_test.go
@@ -22,5 +22,5 @@ class B extends A implements I {
[|/*1*/override|] m() {}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionPartialImplementation_test.go b/internal/fourslash/tests/gen/goToDefinitionPartialImplementation_test.go
index 3b648feff3..83b547c684 100644
--- a/internal/fourslash/tests/gen/goToDefinitionPartialImplementation_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionPartialImplementation_test.go
@@ -26,5 +26,5 @@ module A {
var x: [|/*Part2Use*/IA|];
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "Part2Use")
+ f.VerifyBaselineGoToDefinition(t, true, "Part2Use")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionPrimitives_test.go b/internal/fourslash/tests/gen/goToDefinitionPrimitives_test.go
index 5fa9cec76e..99e447bc17 100644
--- a/internal/fourslash/tests/gen/goToDefinitionPrimitives_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionPrimitives_test.go
@@ -13,5 +13,5 @@ func TestGoToDefinitionPrimitives(t *testing.T) {
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `var x: st/*primitive*/ring;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "primitive")
+ f.VerifyBaselineGoToDefinition(t, true, "primitive")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionPrivateName_test.go b/internal/fourslash/tests/gen/goToDefinitionPrivateName_test.go
index 0f19340464..b8dfdc68b3 100644
--- a/internal/fourslash/tests/gen/goToDefinitionPrivateName_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionPrivateName_test.go
@@ -23,5 +23,5 @@ func TestGoToDefinitionPrivateName(t *testing.T) {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "pnFieldUse", "pnMethodUse", "pnPropUse")
+ f.VerifyBaselineGoToDefinition(t, true, "pnFieldUse", "pnMethodUse", "pnPropUse")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionPropertyAssignment_test.go b/internal/fourslash/tests/gen/goToDefinitionPropertyAssignment_test.go
index 9efc4ab81d..e7d4c5229a 100644
--- a/internal/fourslash/tests/gen/goToDefinitionPropertyAssignment_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionPropertyAssignment_test.go
@@ -18,5 +18,5 @@ Component./*PropertyResult*/displayName = 'Component'
Component.[|/*PropertyClick*/displayName|]`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "FunctionClick", "PropertyClick")
+ f.VerifyBaselineGoToDefinition(t, true, "FunctionClick", "PropertyClick")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionRest_test.go b/internal/fourslash/tests/gen/goToDefinitionRest_test.go
index ad50a2796a..39935e4c76 100644
--- a/internal/fourslash/tests/gen/goToDefinitionRest_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionRest_test.go
@@ -20,5 +20,5 @@ let t: Gen;
var { x, ...rest } = t;
rest.[|/*2*/parent|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "2")
+ f.VerifyBaselineGoToDefinition(t, true, "2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionReturn1_test.go b/internal/fourslash/tests/gen/goToDefinitionReturn1_test.go
index 64645fa259..89f85fb8ad 100644
--- a/internal/fourslash/tests/gen/goToDefinitionReturn1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionReturn1_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinitionReturn1(t *testing.T) {
[|/*start*/return|] 10;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionReturn2_test.go b/internal/fourslash/tests/gen/goToDefinitionReturn2_test.go
index 61f4225dd1..3da50d570d 100644
--- a/internal/fourslash/tests/gen/goToDefinitionReturn2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionReturn2_test.go
@@ -17,5 +17,5 @@ func TestGoToDefinitionReturn2(t *testing.T) {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionReturn3_test.go b/internal/fourslash/tests/gen/goToDefinitionReturn3_test.go
index 85dc2a488c..0041119f7c 100644
--- a/internal/fourslash/tests/gen/goToDefinitionReturn3_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionReturn3_test.go
@@ -17,5 +17,5 @@ func TestGoToDefinitionReturn3(t *testing.T) {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionReturn4_test.go b/internal/fourslash/tests/gen/goToDefinitionReturn4_test.go
index d0b5fd61cd..5a3a3de015 100644
--- a/internal/fourslash/tests/gen/goToDefinitionReturn4_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionReturn4_test.go
@@ -13,5 +13,5 @@ func TestGoToDefinitionReturn4(t *testing.T) {
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `[|/*start*/return|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionReturn5_test.go b/internal/fourslash/tests/gen/goToDefinitionReturn5_test.go
index fd32825e00..1f0f5dffb5 100644
--- a/internal/fourslash/tests/gen/goToDefinitionReturn5_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionReturn5_test.go
@@ -17,5 +17,5 @@ func TestGoToDefinitionReturn5(t *testing.T) {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionReturn6_test.go b/internal/fourslash/tests/gen/goToDefinitionReturn6_test.go
index 14598db819..006e475acb 100644
--- a/internal/fourslash/tests/gen/goToDefinitionReturn6_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionReturn6_test.go
@@ -17,5 +17,5 @@ func TestGoToDefinitionReturn6(t *testing.T) {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionReturn7_test.go b/internal/fourslash/tests/gen/goToDefinitionReturn7_test.go
index 8c1e4d7183..a32367f60b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionReturn7_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionReturn7_test.go
@@ -17,5 +17,5 @@ function /*end*/foo(a: any, b: any): any {
[|/*start*/return|] a + b;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSameFile_test.go b/internal/fourslash/tests/gen/goToDefinitionSameFile_test.go
index f9775bcb59..a3aeeb3607 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSameFile_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSameFile_test.go
@@ -24,5 +24,5 @@ var foo = new /*localClassReference*/localClass();
class fooCls implements /*localInterfaceReference*/localInterface { }
var fooVar = /*localModuleReference*/localModule.foo;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "localVariableReference", "localFunctionReference", "localClassReference", "localInterfaceReference", "localModuleReference")
+ f.VerifyBaselineGoToDefinition(t, false, "localVariableReference", "localFunctionReference", "localClassReference", "localInterfaceReference", "localModuleReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSatisfiesExpression1_test.go b/internal/fourslash/tests/gen/goToDefinitionSatisfiesExpression1_test.go
index 41c1cdefde..186145938b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSatisfiesExpression1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSatisfiesExpression1_test.go
@@ -18,5 +18,5 @@ func TestGoToDefinitionSatisfiesExpression1(t *testing.T) {
//somewhere in app
STRINGS.[|/*usage*/title|]`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "definition", "usage")
+ f.VerifyBaselineGoToDefinition(t, true, "definition", "usage")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionScriptImportServer_test.go b/internal/fourslash/tests/gen/goToDefinitionScriptImportServer_test.go
index 3a105914d1..2fbe0acf00 100644
--- a/internal/fourslash/tests/gen/goToDefinitionScriptImportServer_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionScriptImportServer_test.go
@@ -22,5 +22,5 @@ import [|/*1*/"./scriptThing"|];
import [|/*2*/"./stylez.css"|];
import [|/*3*/"./foo.txt"|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1", "2", "3")
+ f.VerifyBaselineGoToDefinition(t, true, "1", "2", "3")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionScriptImport_test.go b/internal/fourslash/tests/gen/goToDefinitionScriptImport_test.go
index f839bccfba..88c41d1452 100644
--- a/internal/fourslash/tests/gen/goToDefinitionScriptImport_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionScriptImport_test.go
@@ -21,5 +21,5 @@ func TestGoToDefinitionScriptImport(t *testing.T) {
import [|/*1*/"./scriptThing"|];
import [|/*2*/"./stylez.css"|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1", "2")
+ f.VerifyBaselineGoToDefinition(t, true, "1", "2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionShadowVariableInsideModule_test.go b/internal/fourslash/tests/gen/goToDefinitionShadowVariableInsideModule_test.go
index d37813e33a..83be434bad 100644
--- a/internal/fourslash/tests/gen/goToDefinitionShadowVariableInsideModule_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionShadowVariableInsideModule_test.go
@@ -16,5 +16,5 @@ func TestGoToDefinitionShadowVariableInsideModule(t *testing.T) {
/*shadowVariableReference*/shdVar = 1;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "shadowVariableReference")
+ f.VerifyBaselineGoToDefinition(t, false, "shadowVariableReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionShadowVariable_test.go b/internal/fourslash/tests/gen/goToDefinitionShadowVariable_test.go
index 527f25b922..ea858e3603 100644
--- a/internal/fourslash/tests/gen/goToDefinitionShadowVariable_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionShadowVariable_test.go
@@ -17,5 +17,5 @@ function shadowVariableTestModule() {
/*shadowVariableReference*/shadowVariable = 1;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "shadowVariableReference")
+ f.VerifyBaselineGoToDefinition(t, false, "shadowVariableReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty01_test.go b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty01_test.go
index 96c48b7bd2..cadf47b50d 100644
--- a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty01_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty01_test.go
@@ -18,5 +18,5 @@ var obj = {[|/*valueDefinition1*/name|], [|/*valueDefinition2*/id|]};
obj.[|/*valueReference1*/name|];
obj.[|/*valueReference2*/id|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "valueDefinition1", "valueDefinition2", "valueReference1", "valueReference2")
+ f.VerifyBaselineGoToDefinition(t, true, "valueDefinition1", "valueDefinition2", "valueReference1", "valueReference2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty02_test.go b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty02_test.go
index 7cad04ef38..b51a6366f4 100644
--- a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty02_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty02_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinitionShorthandProperty02(t *testing.T) {
[|f/*1*/oo|]
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty03_test.go b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty03_test.go
index efecfd8244..61b5e9b67e 100644
--- a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty03_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty03_test.go
@@ -18,5 +18,5 @@ let /*letDef*/y = {
[|/*letProp*/y|]
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "varProp", "letProp")
+ f.VerifyBaselineGoToDefinition(t, true, "varProp", "letProp")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty04_test.go b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty04_test.go
index 955d260227..508fe65b21 100644
--- a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty04_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty04_test.go
@@ -19,5 +19,5 @@ let x: Foo = {
[|f/*1*/oo|]
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty05_test.go b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty05_test.go
index 8b3698520a..849e76c98b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty05_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty05_test.go
@@ -19,5 +19,5 @@ let x: Foo = {
[|f/*1*/oo|]
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty06_test.go b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty06_test.go
index 5639fb4aa5..45ba5a6a3b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionShorthandProperty06_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionShorthandProperty06_test.go
@@ -19,5 +19,5 @@ let x: Foo = {
[|f/*1*/oo|]()
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSignatureAlias_require_test.go b/internal/fourslash/tests/gen/goToDefinitionSignatureAlias_require_test.go
index 77085588cf..5d6a172faa 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSignatureAlias_require_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSignatureAlias_require_test.go
@@ -21,5 +21,5 @@ const f = require("./a");
import f = require("./a");
[|/*useTs*/f|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use", "useTs")
+ f.VerifyBaselineGoToDefinition(t, true, "use", "useTs")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSimple_test.go b/internal/fourslash/tests/gen/goToDefinitionSimple_test.go
index 2d07fafb0d..7a6771ffcc 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSimple_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSimple_test.go
@@ -17,5 +17,5 @@ class /*2*/c { }
var n = new [|/*1*/c|]();
var n = new [|c/*3*/|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1", "3")
+ f.VerifyBaselineGoToDefinition(t, true, "1", "3")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSourceUnit_test.go b/internal/fourslash/tests/gen/goToDefinitionSourceUnit_test.go
index 9d2aec096c..32870316e4 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSourceUnit_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSourceUnit_test.go
@@ -26,5 +26,5 @@ func TestGoToDefinitionSourceUnit(t *testing.T) {
// @Filename: b.ts
/*fileB*/`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "unknownFile", "knownFile")
+ f.VerifyBaselineGoToDefinition(t, true, "unknownFile", "knownFile")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSwitchCase1_test.go b/internal/fourslash/tests/gen/goToDefinitionSwitchCase1_test.go
index a029e85918..a918973bab 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSwitchCase1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSwitchCase1_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinitionSwitchCase1(t *testing.T) {
[|/*start*/case|] null: break;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSwitchCase2_test.go b/internal/fourslash/tests/gen/goToDefinitionSwitchCase2_test.go
index ff50f02a3f..afbe858a11 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSwitchCase2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSwitchCase2_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinitionSwitchCase2(t *testing.T) {
[|/*start*/default|]: break;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSwitchCase3_test.go b/internal/fourslash/tests/gen/goToDefinitionSwitchCase3_test.go
index 4ee9736a7a..ffd06bced8 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSwitchCase3_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSwitchCase3_test.go
@@ -19,5 +19,5 @@ func TestGoToDefinitionSwitchCase3(t *testing.T) {
};
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start1", "start2")
+ f.VerifyBaselineGoToDefinition(t, true, "start1", "start2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSwitchCase4_test.go b/internal/fourslash/tests/gen/goToDefinitionSwitchCase4_test.go
index 0367913533..7bf999aeb1 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSwitchCase4_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSwitchCase4_test.go
@@ -19,5 +19,5 @@ func TestGoToDefinitionSwitchCase4(t *testing.T) {
[|/*start*/case|] null: break;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSwitchCase5_test.go b/internal/fourslash/tests/gen/goToDefinitionSwitchCase5_test.go
index 2e5a9b483f..645086836b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSwitchCase5_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSwitchCase5_test.go
@@ -13,5 +13,5 @@ func TestGoToDefinitionSwitchCase5(t *testing.T) {
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `export [|/*start*/default|] {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSwitchCase6_test.go b/internal/fourslash/tests/gen/goToDefinitionSwitchCase6_test.go
index 40462d5db5..90f82f006c 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSwitchCase6_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSwitchCase6_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinitionSwitchCase6(t *testing.T) {
[|/*b*/default|];
[|/*c*/case|] 42;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "a", "b", "c")
+ f.VerifyBaselineGoToDefinition(t, true, "a", "b", "c")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionSwitchCase7_test.go b/internal/fourslash/tests/gen/goToDefinitionSwitchCase7_test.go
index 18b242dbda..3e103e4062 100644
--- a/internal/fourslash/tests/gen/goToDefinitionSwitchCase7_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionSwitchCase7_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinitionSwitchCase7(t *testing.T) {
case null:
export [|/*start*/default|] 123;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionTaggedTemplateOverloads_test.go b/internal/fourslash/tests/gen/goToDefinitionTaggedTemplateOverloads_test.go
index 1251dc5eaa..8a870f5de2 100644
--- a/internal/fourslash/tests/gen/goToDefinitionTaggedTemplateOverloads_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionTaggedTemplateOverloads_test.go
@@ -18,5 +18,5 @@ function f(strs: TemplateStringsArray, x: number | boolean) {}
[|/*useFNumber*/f|]` + "`" + `${0}` + "`" + `;
[|/*useFBool*/f|]` + "`" + `${false}` + "`" + `;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "useFNumber", "useFBool")
+ f.VerifyBaselineGoToDefinition(t, true, "useFNumber", "useFBool")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionThis_test.go b/internal/fourslash/tests/gen/goToDefinitionThis_test.go
index 71ec274705..be4f95f231 100644
--- a/internal/fourslash/tests/gen/goToDefinitionThis_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionThis_test.go
@@ -19,5 +19,5 @@ class /*cls*/C {
get self(/*getterDecl*/this: number) { return [|/*getterUse*/this|]; }
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "fnUse", "clsUse", "getterUse")
+ f.VerifyBaselineGoToDefinition(t, true, "fnUse", "clsUse", "getterUse")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionTypeOnlyImport_test.go b/internal/fourslash/tests/gen/goToDefinitionTypeOnlyImport_test.go
index 9be637addb..bf5627b2fe 100644
--- a/internal/fourslash/tests/gen/goToDefinitionTypeOnlyImport_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionTypeOnlyImport_test.go
@@ -20,5 +20,5 @@ export type { SyntaxKind }
import type { SyntaxKind } from './b';
let kind: [|/*2*/SyntaxKind|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "2")
+ f.VerifyBaselineGoToDefinition(t, true, "2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionTypePredicate_test.go b/internal/fourslash/tests/gen/goToDefinitionTypePredicate_test.go
index 867ac5f157..9df49b4aae 100644
--- a/internal/fourslash/tests/gen/goToDefinitionTypePredicate_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionTypePredicate_test.go
@@ -16,5 +16,5 @@ function f(/*parameterDeclaration*/parameter: any): [|/*parameterName*/parameter
return typeof parameter === "string";
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "parameterName", "typeReference")
+ f.VerifyBaselineGoToDefinition(t, true, "parameterName", "typeReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionTypeReferenceDirective_test.go b/internal/fourslash/tests/gen/goToDefinitionTypeReferenceDirective_test.go
index e0af7da678..db6e28ec73 100644
--- a/internal/fourslash/tests/gen/goToDefinitionTypeReferenceDirective_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionTypeReferenceDirective_test.go
@@ -18,5 +18,5 @@ func TestGoToDefinitionTypeReferenceDirective(t *testing.T) {
///
$.x;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionTypeofThis_test.go b/internal/fourslash/tests/gen/goToDefinitionTypeofThis_test.go
index 41c31e07ff..f364ffad2f 100644
--- a/internal/fourslash/tests/gen/goToDefinitionTypeofThis_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionTypeofThis_test.go
@@ -19,5 +19,5 @@ class /*cls*/C {
get self(/*getterDecl*/this: number) { type X = typeof [|/*getterUse*/this|]; }
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "fnUse", "clsUse", "getterUse")
+ f.VerifyBaselineGoToDefinition(t, true, "fnUse", "clsUse", "getterUse")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionUndefinedSymbols_test.go b/internal/fourslash/tests/gen/goToDefinitionUndefinedSymbols_test.go
index 05a97e927a..adbc442729 100644
--- a/internal/fourslash/tests/gen/goToDefinitionUndefinedSymbols_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionUndefinedSymbols_test.go
@@ -16,5 +16,5 @@ var a: some/*undefinedType*/Type;
var x = {}; x.some/*undefinedProperty*/Property;
var a: any; a.some/*unkownProperty*/Property;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, f.MarkerNames()...)
+ f.VerifyBaselineGoToDefinition(t, true, f.MarkerNames()...)
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty1_test.go b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty1_test.go
index ca3270b848..61bc54e6a7 100644
--- a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty1_test.go
@@ -26,5 +26,5 @@ var x : One | Two;
x.[|/*propertyReference*/commonProperty|];
x./*3*/commonFunction;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "propertyReference")
+ f.VerifyBaselineGoToDefinition(t, true, "propertyReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty2_test.go b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty2_test.go
index a5fb8ece19..c52c7e4bcd 100644
--- a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty2_test.go
@@ -28,5 +28,5 @@ var x : One | Two;
x.common.[|/*propertyReference*/a|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "propertyReference")
+ f.VerifyBaselineGoToDefinition(t, true, "propertyReference")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty3_test.go b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty3_test.go
index a8311f6309..ad0732c1f8 100644
--- a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty3_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty3_test.go
@@ -20,5 +20,5 @@ var numbers: number[];
var x = (strings || numbers).[|/*usage*/specialPop|]()`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "usage")
+ f.VerifyBaselineGoToDefinition(t, true, "usage")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty4_test.go b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty4_test.go
index 7c784045dd..6e87070854 100644
--- a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty4_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty4_test.go
@@ -29,5 +29,5 @@ var snapcrackle: SnapCrackle;
var x = (snapcrackle || magnitude || art).[|/*usage*/pop|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "usage")
+ f.VerifyBaselineGoToDefinition(t, true, "usage")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty_discriminated_test.go b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty_discriminated_test.go
index f0328248c7..a75bf9d38b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty_discriminated_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionUnionTypeProperty_discriminated_test.go
@@ -32,5 +32,5 @@ const u2: U = {
[|/*propBogus*/prop|]: 0,
};`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "kind", "prop", "kindBogus", "propBogus")
+ f.VerifyBaselineGoToDefinition(t, true, "kind", "prop", "kindBogus", "propBogus")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionVariableAssignment1_test.go b/internal/fourslash/tests/gen/goToDefinitionVariableAssignment1_test.go
index 10c7c6b3b9..333e7aa9b1 100644
--- a/internal/fourslash/tests/gen/goToDefinitionVariableAssignment1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionVariableAssignment1_test.go
@@ -19,5 +19,5 @@ Foo.prototype.bar = function() {}
new [|Foo/*ref*/|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "foo.js")
- f.VerifyBaselineGoToDefinition(t, "ref")
+ f.VerifyBaselineGoToDefinition(t, true, "ref")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionVariableAssignment2_test.go b/internal/fourslash/tests/gen/goToDefinitionVariableAssignment2_test.go
index 3267978c7b..73234adbc5 100644
--- a/internal/fourslash/tests/gen/goToDefinitionVariableAssignment2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionVariableAssignment2_test.go
@@ -18,5 +18,5 @@ Foo.prototype.bar = function() {}
new [|Foo/*ref*/|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "foo.ts")
- f.VerifyBaselineGoToDefinition(t, "ref")
+ f.VerifyBaselineGoToDefinition(t, true, "ref")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionVariableAssignment3_test.go b/internal/fourslash/tests/gen/goToDefinitionVariableAssignment3_test.go
index 2a74d4edbc..ba6149203b 100644
--- a/internal/fourslash/tests/gen/goToDefinitionVariableAssignment3_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionVariableAssignment3_test.go
@@ -17,5 +17,5 @@ Foo.prototype.bar = function() {}
new [|Foo/*ref*/|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "foo.ts")
- f.VerifyBaselineGoToDefinition(t, "ref")
+ f.VerifyBaselineGoToDefinition(t, true, "ref")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionVariableAssignment_test.go b/internal/fourslash/tests/gen/goToDefinitionVariableAssignment_test.go
index fa00c4a06d..e3df39abbf 100644
--- a/internal/fourslash/tests/gen/goToDefinitionVariableAssignment_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionVariableAssignment_test.go
@@ -20,5 +20,5 @@ Foo.prototype.bar = function() {}
new [|Foo/*ref*/|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "foo.js")
- f.VerifyBaselineGoToDefinition(t, "ref")
+ f.VerifyBaselineGoToDefinition(t, true, "ref")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionYield1_test.go b/internal/fourslash/tests/gen/goToDefinitionYield1_test.go
index 0320866b4a..3b081b1a22 100644
--- a/internal/fourslash/tests/gen/goToDefinitionYield1_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionYield1_test.go
@@ -19,5 +19,5 @@ const /*end2*/genFunction = function*() {
[|/*start2*/yield|] 0;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start1", "start2")
+ f.VerifyBaselineGoToDefinition(t, true, "start1", "start2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionYield2_test.go b/internal/fourslash/tests/gen/goToDefinitionYield2_test.go
index 853de203d2..5f1ea73102 100644
--- a/internal/fourslash/tests/gen/goToDefinitionYield2_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionYield2_test.go
@@ -18,5 +18,5 @@ func TestGoToDefinitionYield2(t *testing.T) {
return gen
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionYield3_test.go b/internal/fourslash/tests/gen/goToDefinitionYield3_test.go
index 80bc5dd8bb..1e2c7f9d6d 100644
--- a/internal/fourslash/tests/gen/goToDefinitionYield3_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionYield3_test.go
@@ -21,5 +21,5 @@ func TestGoToDefinitionYield3(t *testing.T) {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start1", "start2")
+ f.VerifyBaselineGoToDefinition(t, true, "start1", "start2")
}
diff --git a/internal/fourslash/tests/gen/goToDefinitionYield4_test.go b/internal/fourslash/tests/gen/goToDefinitionYield4_test.go
index d7b9f70aac..03712a181e 100644
--- a/internal/fourslash/tests/gen/goToDefinitionYield4_test.go
+++ b/internal/fourslash/tests/gen/goToDefinitionYield4_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinitionYield4(t *testing.T) {
class C { [/*start*/yield 10]() {} }
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/goToDefinition_filteringGenericMappedType_test.go b/internal/fourslash/tests/gen/goToDefinition_filteringGenericMappedType_test.go
index a7e85bd471..a9091fe108 100644
--- a/internal/fourslash/tests/gen/goToDefinition_filteringGenericMappedType_test.go
+++ b/internal/fourslash/tests/gen/goToDefinition_filteringGenericMappedType_test.go
@@ -33,5 +33,5 @@ const obj2 = omit2(obj, {
obj2.[|/*ref*/id|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "ref")
+ f.VerifyBaselineGoToDefinition(t, true, "ref")
}
diff --git a/internal/fourslash/tests/gen/goToDefinition_filteringMappedType_test.go b/internal/fourslash/tests/gen/goToDefinition_filteringMappedType_test.go
index f2e01ba04f..9f50301cb0 100644
--- a/internal/fourslash/tests/gen/goToDefinition_filteringMappedType_test.go
+++ b/internal/fourslash/tests/gen/goToDefinition_filteringMappedType_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinition_filteringMappedType(t *testing.T) {
const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { a: 0 };
filtered.[|/*ref*/a|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "ref")
+ f.VerifyBaselineGoToDefinition(t, true, "ref")
}
diff --git a/internal/fourslash/tests/gen/goToDefinition_mappedType_test.go b/internal/fourslash/tests/gen/goToDefinition_mappedType_test.go
index f3216b0b5b..07ac8e43fe 100644
--- a/internal/fourslash/tests/gen/goToDefinition_mappedType_test.go
+++ b/internal/fourslash/tests/gen/goToDefinition_mappedType_test.go
@@ -15,5 +15,5 @@ func TestGoToDefinition_mappedType(t *testing.T) {
declare const i: { [K in "m"]: I[K] };
i.[|/*ref*/m|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "ref")
+ f.VerifyBaselineGoToDefinition(t, true, "ref")
}
diff --git a/internal/fourslash/tests/gen/goToDefinition_super_test.go b/internal/fourslash/tests/gen/goToDefinition_super_test.go
index a9aae6ff2d..5cece137b6 100644
--- a/internal/fourslash/tests/gen/goToDefinition_super_test.go
+++ b/internal/fourslash/tests/gen/goToDefinition_super_test.go
@@ -30,5 +30,5 @@ class D {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "super", "superExpression", "superBroken")
+ f.VerifyBaselineGoToDefinition(t, true, "super", "superExpression", "superBroken")
}
diff --git a/internal/fourslash/tests/gen/goToDefinition_untypedModule_test.go b/internal/fourslash/tests/gen/goToDefinition_untypedModule_test.go
index 8e4d1e3195..ecd5ab89a4 100644
--- a/internal/fourslash/tests/gen/goToDefinition_untypedModule_test.go
+++ b/internal/fourslash/tests/gen/goToDefinition_untypedModule_test.go
@@ -17,5 +17,5 @@ not read
import { /*def*/f } from "foo";
[|/*use*/f|]();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use")
+ f.VerifyBaselineGoToDefinition(t, true, "use")
}
diff --git a/internal/fourslash/tests/gen/goToModuleAliasDefinition_test.go b/internal/fourslash/tests/gen/goToModuleAliasDefinition_test.go
index 4f795fae0a..e068cabd6f 100644
--- a/internal/fourslash/tests/gen/goToModuleAliasDefinition_test.go
+++ b/internal/fourslash/tests/gen/goToModuleAliasDefinition_test.go
@@ -17,5 +17,5 @@ export class /*2*/Foo {}
import /*3*/n = require('a');
var x = new [|/*1*/n|].Foo();`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, true, "1")
}
diff --git a/internal/fourslash/tests/gen/goToTypeDefinition4_test.go b/internal/fourslash/tests/gen/goToTypeDefinition4_test.go
index b37d04f884..a1d87d9b40 100644
--- a/internal/fourslash/tests/gen/goToTypeDefinition4_test.go
+++ b/internal/fourslash/tests/gen/goToTypeDefinition4_test.go
@@ -19,5 +19,5 @@ import { T } from "./foo";
let x: [|/*reference*/T|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineGoToTypeDefinition(t, "reference")
- f.VerifyBaselineGoToDefinition(t, "reference")
+ f.VerifyBaselineGoToDefinition(t, true, "reference")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionConstructorFunction_test.go b/internal/fourslash/tests/gen/gotoDefinitionConstructorFunction_test.go
index c50e0c3da9..1f4bdfc482 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionConstructorFunction_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionConstructorFunction_test.go
@@ -24,5 +24,5 @@ function runMode () {
new [|/*start*/StringStreamm|]()
};`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "start")
+ f.VerifyBaselineGoToDefinition(t, true, "start")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionInObjectBindingPattern1_test.go b/internal/fourslash/tests/gen/gotoDefinitionInObjectBindingPattern1_test.go
index 065f1e429d..898005e744 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionInObjectBindingPattern1_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionInObjectBindingPattern1_test.go
@@ -19,5 +19,5 @@ interface Test {
}
bar(({[|pr/*goto*/op2|]})=>{});`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "goto")
+ f.VerifyBaselineGoToDefinition(t, true, "goto")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionInObjectBindingPattern2_test.go b/internal/fourslash/tests/gen/gotoDefinitionInObjectBindingPattern2_test.go
index 1c21fbf704..b86506f5e0 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionInObjectBindingPattern2_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionInObjectBindingPattern2_test.go
@@ -14,5 +14,5 @@ func TestGotoDefinitionInObjectBindingPattern2(t *testing.T) {
const content = `var p0 = ({a/*1*/a}) => {console.log(aa)};
function f2({ [|a/*a1*/1|], [|b/*b1*/1|] }: { /*a1_dest*/a1: number, /*b1_dest*/b1: number } = { a1: 0, b1: 0 }) {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1", "a1", "b1")
+ f.VerifyBaselineGoToDefinition(t, true, "1", "a1", "b1")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionLinkTag1_test.go b/internal/fourslash/tests/gen/gotoDefinitionLinkTag1_test.go
index 78f94a66b0..89e5171464 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionLinkTag1_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionLinkTag1_test.go
@@ -36,5 +36,5 @@ function foo(x) { }
/** {@link /*use7*/[|Foo|] }dd*/
const f = ""`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use1", "use2", "use3", "use4", "use5", "use6", "use7")
+ f.VerifyBaselineGoToDefinition(t, false, "use1", "use2", "use3", "use4", "use5", "use6", "use7")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionLinkTag2_test.go b/internal/fourslash/tests/gen/gotoDefinitionLinkTag2_test.go
index 1a71fdebf9..a146bd1d09 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionLinkTag2_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionLinkTag2_test.go
@@ -16,5 +16,5 @@ func TestGotoDefinitionLinkTag2(t *testing.T) {
[|/*2*/A|]
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, false, "1")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionLinkTag3_test.go b/internal/fourslash/tests/gen/gotoDefinitionLinkTag3_test.go
index bffc3f3939..31c7af31ec 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionLinkTag3_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionLinkTag3_test.go
@@ -20,5 +20,5 @@ interface [|/*2*/Foo|] {
foo: E.Foo;
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, false, "1")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionLinkTag4_test.go b/internal/fourslash/tests/gen/gotoDefinitionLinkTag4_test.go
index 4ce0bb3688..da2fc4a5bc 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionLinkTag4_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionLinkTag4_test.go
@@ -21,5 +21,5 @@ enum E {
Foo
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, false, "1")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionLinkTag5_test.go b/internal/fourslash/tests/gen/gotoDefinitionLinkTag5_test.go
index 8c13319dd1..a8be0065f8 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionLinkTag5_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionLinkTag5_test.go
@@ -17,5 +17,5 @@ func TestGotoDefinitionLinkTag5(t *testing.T) {
[|/*2*/B|]
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, false, "1")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionLinkTag6_test.go b/internal/fourslash/tests/gen/gotoDefinitionLinkTag6_test.go
index 129ce4cb00..7dcbdc64cd 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionLinkTag6_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionLinkTag6_test.go
@@ -16,5 +16,5 @@ func TestGotoDefinitionLinkTag6(t *testing.T) {
[|/*2*/A|]
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, false, "1")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionPropertyAccessExpressionHeritageClause_test.go b/internal/fourslash/tests/gen/gotoDefinitionPropertyAccessExpressionHeritageClause_test.go
index 33da44d58e..f172cbb95b 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionPropertyAccessExpressionHeritageClause_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionPropertyAccessExpressionHeritageClause_test.go
@@ -18,5 +18,5 @@ function foo() {
class C extends (foo()).[|/*B*/B|] {}
class C1 extends foo().[|/*B1*/B|] {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "B", "B1")
+ f.VerifyBaselineGoToDefinition(t, true, "B", "B1")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionSatisfiesTag_test.go b/internal/fourslash/tests/gen/gotoDefinitionSatisfiesTag_test.go
index 433911b622..3320e7dfbc 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionSatisfiesTag_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionSatisfiesTag_test.go
@@ -23,5 +23,5 @@ func TestGotoDefinitionSatisfiesTag(t *testing.T) {
/** @satisfies {/*use*/[|T|]} comment */
const foo = { a: 1 };`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use")
+ f.VerifyBaselineGoToDefinition(t, false, "use")
}
diff --git a/internal/fourslash/tests/gen/gotoDefinitionThrowsTag_test.go b/internal/fourslash/tests/gen/gotoDefinitionThrowsTag_test.go
index 406c93d8c0..5029bfe1da 100644
--- a/internal/fourslash/tests/gen/gotoDefinitionThrowsTag_test.go
+++ b/internal/fourslash/tests/gen/gotoDefinitionThrowsTag_test.go
@@ -18,5 +18,5 @@ func TestGotoDefinitionThrowsTag(t *testing.T) {
*/
function f() {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use")
+ f.VerifyBaselineGoToDefinition(t, false, "use")
}
diff --git a/internal/fourslash/tests/gen/hoverOverComment_test.go b/internal/fourslash/tests/gen/hoverOverComment_test.go
index 971e578dc1..c6cbac301f 100644
--- a/internal/fourslash/tests/gen/hoverOverComment_test.go
+++ b/internal/fourslash/tests/gen/hoverOverComment_test.go
@@ -18,5 +18,5 @@ func TestHoverOverComment(t *testing.T) {
f.GoToMarker(t, "")
f.VerifyQuickInfoIs(t, "", "")
f.VerifyBaselineFindAllReferences(t, "")
- f.VerifyBaselineGoToDefinition(t, "")
+ f.VerifyBaselineGoToDefinition(t, false, "")
}
diff --git a/internal/fourslash/tests/gen/importTypeNodeGoToDefinition_test.go b/internal/fourslash/tests/gen/importTypeNodeGoToDefinition_test.go
index ab2f1fe217..f148d932d4 100644
--- a/internal/fourslash/tests/gen/importTypeNodeGoToDefinition_test.go
+++ b/internal/fourslash/tests/gen/importTypeNodeGoToDefinition_test.go
@@ -21,5 +21,5 @@ func TestImportTypeNodeGoToDefinition(t *testing.T) {
type A = typeof import([|/*1*/"./ns"|]).[|/*2*/Foo|].[|/*3*/Bar|];
type B = import([|/*4*/"./ns"|]).[|/*5*/Foo|].[|/*6*/Bar|].[|/*7*/Baz|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1", "2", "3", "4", "5", "6", "7")
+ f.VerifyBaselineGoToDefinition(t, true, "1", "2", "3", "4", "5", "6", "7")
}
diff --git a/internal/fourslash/tests/gen/javaScriptClass3_test.go b/internal/fourslash/tests/gen/javaScriptClass3_test.go
index 29cf8f2e05..2edced2609 100644
--- a/internal/fourslash/tests/gen/javaScriptClass3_test.go
+++ b/internal/fourslash/tests/gen/javaScriptClass3_test.go
@@ -24,5 +24,5 @@ var x = new Foo();
x.[|alpha/*src1*/|];
x.[|beta/*src2*/|];`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "src1", "src2")
+ f.VerifyBaselineGoToDefinition(t, true, "src1", "src2")
}
diff --git a/internal/fourslash/tests/gen/jsDocSee1_test.go b/internal/fourslash/tests/gen/jsDocSee1_test.go
index ad82961ab3..b4889ae927 100644
--- a/internal/fourslash/tests/gen/jsDocSee1_test.go
+++ b/internal/fourslash/tests/gen/jsDocSee1_test.go
@@ -30,5 +30,5 @@ const [|/*def3*/d|] = ""
/** @see /*use5*/[|d|] dd*/
const e = ""`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use1", "use2", "use3", "use4", "use5")
+ f.VerifyBaselineGoToDefinition(t, false, "use1", "use2", "use3", "use4", "use5")
}
diff --git a/internal/fourslash/tests/gen/jsDocSee2_test.go b/internal/fourslash/tests/gen/jsDocSee2_test.go
index fb43ab1d26..5228017d01 100644
--- a/internal/fourslash/tests/gen/jsDocSee2_test.go
+++ b/internal/fourslash/tests/gen/jsDocSee2_test.go
@@ -26,5 +26,5 @@ const f = ""
/** @see d@{/*use7*/[|fff|]} partial reference */
const g = ""`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use1", "use2", "use3", "use4", "use5", "use6", "use7")
+ f.VerifyBaselineGoToDefinition(t, true, "use1", "use2", "use3", "use4", "use5", "use6", "use7")
}
diff --git a/internal/fourslash/tests/gen/jsDocSee3_test.go b/internal/fourslash/tests/gen/jsDocSee3_test.go
index ec36a4d074..83b49dc727 100644
--- a/internal/fourslash/tests/gen/jsDocSee3_test.go
+++ b/internal/fourslash/tests/gen/jsDocSee3_test.go
@@ -19,5 +19,5 @@ func TestJsDocSee3(t *testing.T) {
}
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use1")
+ f.VerifyBaselineGoToDefinition(t, false, "use1")
}
diff --git a/internal/fourslash/tests/gen/jsDocSee4_test.go b/internal/fourslash/tests/gen/jsDocSee4_test.go
index 4054acfb82..dc7fb7f415 100644
--- a/internal/fourslash/tests/gen/jsDocSee4_test.go
+++ b/internal/fourslash/tests/gen/jsDocSee4_test.go
@@ -28,5 +28,5 @@ const t2 = 1
*/
const t3 = 1`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "use1", "use2", "use3")
+ f.VerifyBaselineGoToDefinition(t, false, "use1", "use2", "use3")
}
diff --git a/internal/fourslash/tests/gen/jsDocServices_test.go b/internal/fourslash/tests/gen/jsDocServices_test.go
index e25cdc74ce..80c50fd5e0 100644
--- a/internal/fourslash/tests/gen/jsDocServices_test.go
+++ b/internal/fourslash/tests/gen/jsDocServices_test.go
@@ -26,5 +26,5 @@ function f([|[|/*def*/{| "contextRangeIndex": 1 |}foo|]: I|]) {
f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[0], f.Ranges()[2], f.Ranges()[3])
f.VerifyBaselineDocumentHighlights(t, nil /*preferences*/, f.Ranges()[0], f.Ranges()[2], f.Ranges()[3])
f.VerifyBaselineGoToTypeDefinition(t, "use")
- f.VerifyBaselineGoToDefinition(t, "use")
+ f.VerifyBaselineGoToDefinition(t, false, "use")
}
diff --git a/internal/fourslash/tests/gen/jsdocTypedefTagGoToDefinition_test.go b/internal/fourslash/tests/gen/jsdocTypedefTagGoToDefinition_test.go
index 7cb4093f34..2e946f5836 100644
--- a/internal/fourslash/tests/gen/jsdocTypedefTagGoToDefinition_test.go
+++ b/internal/fourslash/tests/gen/jsdocTypedefTagGoToDefinition_test.go
@@ -29,5 +29,5 @@ var person; person.[|personName/*3*/|]
/** @type {Animal} */
var animal; animal.[|animalName/*4*/|]`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "3", "4")
+ f.VerifyBaselineGoToDefinition(t, true, "3", "4")
}
diff --git a/internal/fourslash/tests/gen/jsdocTypedefTagServices_test.go b/internal/fourslash/tests/gen/jsdocTypedefTagServices_test.go
index 9cfe690620..5f2a24c378 100644
--- a/internal/fourslash/tests/gen/jsdocTypedefTagServices_test.go
+++ b/internal/fourslash/tests/gen/jsdocTypedefTagServices_test.go
@@ -28,5 +28,5 @@ const product = null;`
f.VerifyBaselineFindAllReferences(t, "use", "def")
f.VerifyBaselineRename(t, nil /*preferences*/, ToAny(f.Ranges()[1:])...)
f.VerifyBaselineDocumentHighlights(t, nil /*preferences*/, ToAny(f.Ranges()[1:])...)
- f.VerifyBaselineGoToDefinition(t, "use")
+ f.VerifyBaselineGoToDefinition(t, true, "use")
}
diff --git a/internal/fourslash/tests/gen/jsxSpreadReference_test.go b/internal/fourslash/tests/gen/jsxSpreadReference_test.go
index f602955d29..d94658e82f 100644
--- a/internal/fourslash/tests/gen/jsxSpreadReference_test.go
+++ b/internal/fourslash/tests/gen/jsxSpreadReference_test.go
@@ -29,5 +29,5 @@ class MyClass {
var x = ;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "nn")
- f.VerifyBaselineGoToDefinition(t, "src")
+ f.VerifyBaselineGoToDefinition(t, true, "src")
}
diff --git a/internal/fourslash/tests/gen/qualifiedName_import-declaration-with-variable-entity-names_test.go b/internal/fourslash/tests/gen/qualifiedName_import-declaration-with-variable-entity-names_test.go
index 6acc245a7b..67e2077134 100644
--- a/internal/fourslash/tests/gen/qualifiedName_import-declaration-with-variable-entity-names_test.go
+++ b/internal/fourslash/tests/gen/qualifiedName_import-declaration-with-variable-entity-names_test.go
@@ -40,5 +40,5 @@ var x = Alpha.[|{| "name" : "mem" |}x|]`
},
})
f.VerifyBaselineDocumentHighlights(t, nil /*preferences*/, "import")
- f.VerifyBaselineGoToDefinition(t, "import")
+ f.VerifyBaselineGoToDefinition(t, false, "import")
}
diff --git a/internal/fourslash/tests/gen/reallyLargeFile_test.go b/internal/fourslash/tests/gen/reallyLargeFile_test.go
index db3bfb2fd9..e4033fab63 100644
--- a/internal/fourslash/tests/gen/reallyLargeFile_test.go
+++ b/internal/fourslash/tests/gen/reallyLargeFile_test.go
@@ -583719,5 +583719,5 @@ namespace /*1*/Foo {
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "1")
+ f.VerifyBaselineGoToDefinition(t, false, "1")
}
diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionClasses_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionClasses_test.go
index eae08d8b2a..683e2cbb4c 100644
--- a/internal/fourslash/tests/gen/tsxGoToDefinitionClasses_test.go
+++ b/internal/fourslash/tests/gen/tsxGoToDefinitionClasses_test.go
@@ -26,5 +26,5 @@ var x = <[|My/*c*/Class|] />;
var y = ;
var z = <[|MyCl/*w*/ass|] wrong= 'hello' />;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "c", "p", "w")
+ f.VerifyBaselineGoToDefinition(t, true, "c", "p", "w")
}
diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionIntrinsics_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionIntrinsics_test.go
index 3004b81b24..a7bc0b8a2a 100644
--- a/internal/fourslash/tests/gen/tsxGoToDefinitionIntrinsics_test.go
+++ b/internal/fourslash/tests/gen/tsxGoToDefinitionIntrinsics_test.go
@@ -26,5 +26,5 @@ var x = <[|di/*ds*/v|] />;
var y = <[|s/*ss*/pan|] />;
var z = ;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "ds", "ss", "ps")
+ f.VerifyBaselineGoToDefinition(t, true, "ds", "ss", "ps")
}
diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction1_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction1_test.go
index 5a3fa3be7a..43722cd861 100644
--- a/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction1_test.go
+++ b/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction1_test.go
@@ -31,5 +31,5 @@ let opt1 = <[|Op/*two*/t|] [|pr/*p1*/opx|]={100} />;
let opt2 = <[|Op/*three*/t|] propx={100} [|opt/*p2*/ional|] />;
let opt3 = <[|Op/*four*/t|] wr/*p3*/ong />;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "one", "two", "three", "four", "p1", "p2")
+ f.VerifyBaselineGoToDefinition(t, true, "one", "two", "three", "four", "p1", "p2")
}
diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction2_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction2_test.go
index 542014f9c3..9c3ee6e942 100644
--- a/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction2_test.go
+++ b/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction2_test.go
@@ -40,5 +40,5 @@ let opt = <[|Main/*fourthTarget*/Button|] onClick={()=>{}} ignore-prop />;
let opt = <[|Main/*fifthTarget*/Button|] goTo="goTo" />;
let opt = <[|Main/*sixthTarget*/Button|] wrong />;`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "firstTarget", "secondTarget", "thirdTarget", "fourthTarget", "fifthTarget", "sixthTarget")
+ f.VerifyBaselineGoToDefinition(t, true, "firstTarget", "secondTarget", "thirdTarget", "fourthTarget", "fifthTarget", "sixthTarget")
}
diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType1_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType1_test.go
index 0278a88ab6..3b549806b5 100644
--- a/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType1_test.go
+++ b/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType1_test.go
@@ -29,5 +29,5 @@ function SFC2(prop: { x: boolean }) {
var /*def*/SFCComp = SFC1 || SFC2;
<[|SFC/*one*/Comp|] x />`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "one")
+ f.VerifyBaselineGoToDefinition(t, true, "one")
}
diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType2_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType2_test.go
index f6a91c8869..3b96e6d142 100644
--- a/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType2_test.go
+++ b/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType2_test.go
@@ -28,5 +28,5 @@ class RC2 extends React.Component<{}, {}> {
var /*pt1*/RCComp = RC1 || RC2;
<[|RC/*one*/Comp|] />`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyBaselineGoToDefinition(t, "one")
+ f.VerifyBaselineGoToDefinition(t, true, "one")
}
diff --git a/internal/ls/definition.go b/internal/ls/definition.go
index ac9f0a722d..9f0d231fc7 100644
--- a/internal/ls/definition.go
+++ b/internal/ls/definition.go
@@ -7,30 +7,37 @@ import (
"github.com/microsoft/typescript-go/internal/ast"
"github.com/microsoft/typescript-go/internal/astnav"
"github.com/microsoft/typescript-go/internal/checker"
+ "github.com/microsoft/typescript-go/internal/collections"
"github.com/microsoft/typescript-go/internal/core"
"github.com/microsoft/typescript-go/internal/lsp/lsproto"
"github.com/microsoft/typescript-go/internal/scanner"
)
-func (l *LanguageService) ProvideDefinition(ctx context.Context, documentURI lsproto.DocumentUri, position lsproto.Position) (lsproto.DefinitionResponse, error) {
+func (l *LanguageService) ProvideDefinition(
+ ctx context.Context,
+ documentURI lsproto.DocumentUri,
+ position lsproto.Position,
+ clientSupportsLink bool,
+) (lsproto.DefinitionResponse, error) {
program, file := l.getProgramAndFile(documentURI)
node := astnav.GetTouchingPropertyName(file, int(l.converters.LineAndCharacterToPosition(file, position)))
if node.Kind == ast.KindSourceFile {
return lsproto.LocationOrLocationsOrDefinitionLinksOrNull{}, nil
}
+ originSelectionRange := l.createLspRangeFromNode(node, file)
c, done := program.GetTypeCheckerForFile(ctx, file)
defer done()
if node.Kind == ast.KindOverrideKeyword {
if sym := getSymbolForOverriddenMember(c, node); sym != nil {
- return l.createLocationsFromDeclarations(sym.Declarations), nil
+ return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, sym.Declarations), nil
}
}
if ast.IsJumpStatementTarget(node) {
if label := getTargetLabel(node.Parent, node.Text()); label != nil {
- return l.createLocationsFromDeclarations([]*ast.Node{label}), nil
+ return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, []*ast.Node{label}), nil
}
}
@@ -43,7 +50,7 @@ func (l *LanguageService) ProvideDefinition(ctx context.Context, documentURI lsp
if node.Kind == ast.KindReturnKeyword || node.Kind == ast.KindYieldKeyword || node.Kind == ast.KindAwaitKeyword {
if fn := ast.FindAncestor(node, ast.IsFunctionLikeDeclaration); fn != nil {
- return l.createLocationsFromDeclarations([]*ast.Node{fn}), nil
+ return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, []*ast.Node{fn}), nil
}
}
@@ -54,15 +61,21 @@ func (l *LanguageService) ProvideDefinition(ctx context.Context, documentURI lsp
nonFunctionDeclarations := core.Filter(slices.Clip(declarations), func(node *ast.Node) bool { return !ast.IsFunctionLike(node) })
declarations = append(nonFunctionDeclarations, calledDeclaration)
}
- return l.createLocationsFromDeclarations(declarations), nil
+ return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, declarations), nil
}
-func (l *LanguageService) ProvideTypeDefinition(ctx context.Context, documentURI lsproto.DocumentUri, position lsproto.Position) (lsproto.DefinitionResponse, error) {
+func (l *LanguageService) ProvideTypeDefinition(
+ ctx context.Context,
+ documentURI lsproto.DocumentUri,
+ position lsproto.Position,
+ clientSupportsLink bool,
+) (lsproto.DefinitionResponse, error) {
program, file := l.getProgramAndFile(documentURI)
node := astnav.GetTouchingPropertyName(file, int(l.converters.LineAndCharacterToPosition(file, position)))
if node.Kind == ast.KindSourceFile {
return lsproto.LocationOrLocationsOrDefinitionLinksOrNull{}, nil
}
+ originSelectionRange := l.createLspRangeFromNode(node, file)
c, done := program.GetTypeCheckerForFile(ctx, file)
defer done()
@@ -76,10 +89,10 @@ func (l *LanguageService) ProvideTypeDefinition(ctx context.Context, documentURI
declarations = core.Concatenate(getDeclarationsFromType(typeArgument), declarations)
}
if len(declarations) != 0 {
- return l.createLocationsFromDeclarations(declarations), nil
+ return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, declarations), nil
}
if symbol.Flags&ast.SymbolFlagsValue == 0 && symbol.Flags&ast.SymbolFlagsType != 0 {
- return l.createLocationsFromDeclarations(symbol.Declarations), nil
+ return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, symbol.Declarations), nil
}
}
@@ -99,15 +112,49 @@ func getDeclarationNameForKeyword(node *ast.Node) *ast.Node {
return node
}
-func (l *LanguageService) createLocationsFromDeclarations(declarations []*ast.Node) lsproto.DefinitionResponse {
- locations := make([]lsproto.Location, 0, len(declarations))
+type fileRange struct {
+ fileName string
+ fileRange core.TextRange
+}
+
+func (l *LanguageService) createLocationsFromDeclarations(
+ originSelectionRange *lsproto.Range,
+ clientSupportsLink bool,
+ declarations []*ast.Node,
+) lsproto.DefinitionResponse {
+ locations := make([]*lsproto.LocationLink, 0, len(declarations))
+ locationRanges := collections.Set[fileRange]{}
for _, decl := range declarations {
file := ast.GetSourceFileOfNode(decl)
+ fileName := file.FileName()
name := core.OrElse(ast.GetNameOfDeclaration(decl), decl)
- nodeRange := createRangeFromNode(name, file)
- mappedLocation := l.getMappedLocation(file.FileName(), nodeRange)
- locations = core.AppendIfUnique(locations, mappedLocation)
+ nameRange := createRangeFromNode(name, file)
+ if locationRanges.AddIfAbsent(fileRange{fileName, nameRange}) {
+ contextNode := core.OrElse(getContextNode(decl), decl)
+ contextRange := core.OrElse(toContextRange(&nameRange, file, contextNode), &nameRange)
+ targetSelectionLoc := l.getMappedLocation(fileName, nameRange)
+ targetLoc := l.getMappedLocation(fileName, *contextRange)
+ locations = append(locations, &lsproto.LocationLink{
+ OriginSelectionRange: originSelectionRange,
+ TargetSelectionRange: targetSelectionLoc.Range,
+ TargetUri: targetLoc.Uri,
+ TargetRange: targetLoc.Range,
+ })
+ }
}
+ if !clientSupportsLink {
+ return createLocationsFromLinks(locations)
+ }
+ return lsproto.LocationOrLocationsOrDefinitionLinksOrNull{DefinitionLinks: &locations}
+}
+
+func createLocationsFromLinks(links []*lsproto.LocationLink) lsproto.DefinitionResponse {
+ locations := core.Map(links, func(link *lsproto.LocationLink) lsproto.Location {
+ return lsproto.Location{
+ Uri: link.TargetUri,
+ Range: link.TargetSelectionRange,
+ }
+ })
return lsproto.LocationOrLocationsOrDefinitionLinksOrNull{Locations: &locations}
}
@@ -232,3 +279,8 @@ func getDeclarationsFromType(t *checker.Type) []*ast.Node {
}
return result
}
+
+func clientSupportsLink(clientCapabilities *lsproto.DefinitionClientCapabilities) bool {
+ return clientCapabilities != nil &&
+ ptrIsTrue(clientCapabilities.LinkSupport)
+}
diff --git a/internal/ls/findallreferences.go b/internal/ls/findallreferences.go
index 11e51ec670..36bd84f8a8 100644
--- a/internal/ls/findallreferences.go
+++ b/internal/ls/findallreferences.go
@@ -118,7 +118,7 @@ func (l *LanguageService) getFileNameOfEntry(entry *referenceEntry) string {
func (l *LanguageService) resolveEntry(entry *referenceEntry) *referenceEntry {
if entry.textRange == nil {
sourceFile := ast.GetSourceFileOfNode(entry.node)
- entry.textRange = l.getRangeOfNode(entry.node, sourceFile, nil /*endNode*/)
+ entry.textRange = l.getLspRangeOfNode(entry.node, sourceFile, nil /*endNode*/)
entry.fileName = sourceFile.FileName()
}
return entry
@@ -261,7 +261,16 @@ func getContextNode(node *ast.Node) *ast.Node {
}
// utils
-func (l *LanguageService) getRangeOfNode(node *ast.Node, sourceFile *ast.SourceFile, endNode *ast.Node) *lsproto.Range {
+func (l *LanguageService) getLspRangeOfNode(node *ast.Node, sourceFile *ast.SourceFile, endNode *ast.Node) *lsproto.Range {
+ if sourceFile == nil {
+ sourceFile = ast.GetSourceFileOfNode(node)
+ }
+ textRange := getRangeOfNode(node, sourceFile, endNode)
+ return l.createLspRangeFromRange(textRange, sourceFile)
+}
+
+// `getTextSpan`
+func getRangeOfNode(node *ast.Node, sourceFile *ast.SourceFile, endNode *ast.Node) core.TextRange {
if sourceFile == nil {
sourceFile = ast.GetSourceFileOfNode(node)
}
@@ -277,7 +286,7 @@ func (l *LanguageService) getRangeOfNode(node *ast.Node, sourceFile *ast.SourceF
if endNode != nil && endNode.Kind == ast.KindCaseBlock {
end = endNode.Pos()
}
- return l.createLspRangeFromBounds(start, end, sourceFile)
+ return core.NewTextRange(start, end)
}
func isValidReferencePosition(node *ast.Node, searchSymbolName string) bool {
diff --git a/internal/ls/hover.go b/internal/ls/hover.go
index 7eb2e3ada5..77099e8808 100644
--- a/internal/ls/hover.go
+++ b/internal/ls/hover.go
@@ -32,7 +32,7 @@ func (l *LanguageService) ProvideHover(ctx context.Context, documentURI lsproto.
if quickInfo == "" {
return lsproto.HoverOrNull{}, nil
}
- hoverRange := l.getRangeOfNode(rangeNode, nil, nil)
+ hoverRange := l.getLspRangeOfNode(rangeNode, nil, nil)
return lsproto.HoverOrNull{
Hover: &lsproto.Hover{
diff --git a/internal/ls/utilities.go b/internal/ls/utilities.go
index 3a90865186..433d170c8d 100644
--- a/internal/ls/utilities.go
+++ b/internal/ls/utilities.go
@@ -1668,3 +1668,16 @@ func nodeSeenTracker() func(*ast.Node) bool {
return seen.AddIfAbsent(node)
}
}
+
+// FindAllReferences.toContextSpan
+func toContextRange(textRange *core.TextRange, contextFile *ast.SourceFile, context *ast.Node) *core.TextRange {
+ if context == nil {
+ return textRange
+ }
+ // !!! isContextWithStartAndEndNode
+ contextRange := getRangeOfNode(context, contextFile, nil /*endNode*/)
+ if contextRange.Pos() != textRange.Pos() || contextRange.End() != textRange.End() {
+ return &contextRange
+ }
+ return nil
+}
diff --git a/internal/lsp/server.go b/internal/lsp/server.go
index c51a40547f..6e24ffd59a 100644
--- a/internal/lsp/server.go
+++ b/internal/lsp/server.go
@@ -822,11 +822,11 @@ func (s *Server) handleSignatureHelp(ctx context.Context, languageService *ls.La
}
func (s *Server) handleDefinition(ctx context.Context, ls *ls.LanguageService, params *lsproto.DefinitionParams) (lsproto.DefinitionResponse, error) {
- return ls.ProvideDefinition(ctx, params.TextDocument.Uri, params.Position)
+ return ls.ProvideDefinition(ctx, params.TextDocument.Uri, params.Position, getDefinitionClientSupportsLink(s.initializeParams))
}
func (s *Server) handleTypeDefinition(ctx context.Context, ls *ls.LanguageService, params *lsproto.TypeDefinitionParams) (lsproto.TypeDefinitionResponse, error) {
- return ls.ProvideTypeDefinition(ctx, params.TextDocument.Uri, params.Position)
+ return ls.ProvideTypeDefinition(ctx, params.TextDocument.Uri, params.Position, getTypeDefinitionClientSupportsLink(s.initializeParams))
}
func (s *Server) handleReferences(ctx context.Context, ls *ls.LanguageService, params *lsproto.ReferenceParams) (lsproto.ReferencesResponse, error) {
@@ -976,3 +976,19 @@ func getCompletionClientCapabilities(params *lsproto.InitializeParams) *lsproto.
}
return params.Capabilities.TextDocument.Completion
}
+
+func getDefinitionClientSupportsLink(params *lsproto.InitializeParams) bool {
+ if params == nil || params.Capabilities == nil || params.Capabilities.TextDocument == nil ||
+ params.Capabilities.TextDocument.Definition == nil {
+ return false
+ }
+ return ptrIsTrue(params.Capabilities.TextDocument.Definition.LinkSupport)
+}
+
+func getTypeDefinitionClientSupportsLink(params *lsproto.InitializeParams) bool {
+ if params == nil || params.Capabilities == nil || params.Capabilities.TextDocument == nil ||
+ params.Capabilities.TextDocument.TypeDefinition == nil {
+ return false
+ }
+ return ptrIsTrue(params.Capabilities.TextDocument.TypeDefinition.LinkSupport)
+}
diff --git a/internal/project/untitled_test.go b/internal/project/untitled_test.go
index 0291394040..8eb0b93054 100644
--- a/internal/project/untitled_test.go
+++ b/internal/project/untitled_test.go
@@ -87,7 +87,7 @@ x++;`
assert.Assert(t, len(refs) == 3, "Expected 3 references, got %d", len(refs))
// Also test definition using ProvideDefinition
- definition, err := languageService.ProvideDefinition(ctx, uri, lspPosition)
+ definition, err := languageService.ProvideDefinition(ctx, uri, lspPosition, false)
assert.NilError(t, err)
if definition.Locations != nil {
t.Logf("Definition found: %d locations", len(*definition.Locations))
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapGoToDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapGoToDefinition.baseline.jsonc
index f7a410817c..2ec9a73650 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapGoToDefinition.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapGoToDefinition.baseline.jsonc
@@ -11,4 +11,4 @@
// === /mymodule.ts ===
// import * as mod from "./indexdef";
// const instance = new mod.Foo();
-// instance./*GOTO DEF*/methodName({member: 12});
\ No newline at end of file
+// instance./*GOTO DEF*/[|methodName|]({member: 12});
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc
index 7d76808348..a944ce8093 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc
@@ -11,4 +11,4 @@
// === /mymodule.ts ===
// import * as mod from "./out/indexdef";
// const instance = new mod.Foo();
-// instance./*GOTO DEF*/methodName({member: 12});
\ No newline at end of file
+// instance./*GOTO DEF*/[|methodName|]({member: 12});
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc
index e8f7348bf6..cbf997bf3d 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc
@@ -9,7 +9,7 @@
// === /buttonClass/Source.ts ===
// // I cannot F12 navigate to Control
// // vvvvvvv
-// class Button extends /*GOTO DEF*/Control {
+// class Button extends /*GOTO DEF*/[|Control|] {
// public myFunction() {
// // I cannot F12 navigate to myVar
// // vvvvv
@@ -32,7 +32,7 @@
// public myFunction() {
// // I cannot F12 navigate to myVar
// // vvvvv
-// if (typeof this./*GOTO DEF*/myVar === 'boolean') {
+// if (typeof this./*GOTO DEF*/[|myVar|] === 'boolean') {
// this.myVar;
// } else {
// this.myVar.toLocaleUpperCase();
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/definition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/definition.baseline.jsonc
index 90392f6142..ebea7b18a8 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/definition.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/definition.baseline.jsonc
@@ -3,5 +3,5 @@
// [|export class Foo {}|]
// === /b.ts ===
-// import n = require('./a/*GOTO DEF*/');
+// import n = require([|'./a/*GOTO DEF*/'|]);
// var x = new n.Foo();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/definition01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/definition01.baseline.jsonc
index 90392f6142..ebea7b18a8 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/definition01.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/definition01.baseline.jsonc
@@ -3,5 +3,5 @@
// [|export class Foo {}|]
// === /b.ts ===
-// import n = require('./a/*GOTO DEF*/');
+// import n = require([|'./a/*GOTO DEF*/'|]);
// var x = new n.Foo();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/findAllRefsForDefaultExport.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/findAllRefsForDefaultExport.baseline.jsonc
index 4b94a0a31b..17b30a346a 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/findAllRefsForDefaultExport.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/findAllRefsForDefaultExport.baseline.jsonc
@@ -4,4 +4,4 @@
// === /b.ts ===
// import g from "./a";
-// /*GOTO DEF*/g();
\ No newline at end of file
+// /*GOTO DEF*/[|g|]();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAcrossMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAcrossMultipleProjects.baseline.jsonc
index 5759a9945b..53c5b5e911 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAcrossMultipleProjects.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAcrossMultipleProjects.baseline.jsonc
@@ -16,4 +16,4 @@
// ///
// ///
// ///
-// /*GOTO DEF*/x++;
\ No newline at end of file
+// /*GOTO DEF*/[|x|]++;
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc
index 3a900298ab..6bfffdb2f0 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc
@@ -6,4 +6,4 @@
// }
// === /index.ts ===
-// import styles from /*GOTO DEF*/"./index.css";
\ No newline at end of file
+// import styles from /*GOTO DEF*/[|"./index.css"|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassConstructors.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassConstructors.baseline.jsonc
index 9d9d23db29..ef3945a25a 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassConstructors.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassConstructors.baseline.jsonc
@@ -11,7 +11,7 @@
// === /main.ts ===
// import { Derived } from './definitions'
-// const derived = new /*GOTO DEF*/Derived(cArg)
+// const derived = new /*GOTO DEF*/[|Derived|](cArg)
@@ -60,4 +60,4 @@
// readonly name: string = 'SameFile'
// }
// const SameFile = new SameFile(cArg)
-// const wrapper = new /*GOTO DEF*/Base(cArg)
\ No newline at end of file
+// const wrapper = new /*GOTO DEF*/[|Base|](cArg)
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecorator.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecorator.baseline.jsonc
index 0ebd8c5a1e..6c6c9dcbb0 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecorator.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecorator.baseline.jsonc
@@ -8,7 +8,7 @@
// }
// === /b.ts ===
-// @/*GOTO DEF*/decorator
+// @/*GOTO DEF*/[|decorator|]
// class C {
// @decoratorFactory(a, "22", true)
// method() {}
@@ -28,6 +28,6 @@
// === /b.ts ===
// @decorator
// class C {
-// @decora/*GOTO DEF*/torFactory(a, "22", true)
+// @[|decora/*GOTO DEF*/torFactory|](a, "22", true)
// method() {}
// }
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire1.baseline.jsonc
index 5b50609eda..07a1ff88de 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire1.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire1.baseline.jsonc
@@ -5,4 +5,4 @@
// === /index.js ===
// const { Util } = require('./util');
-// new Util/*GOTO DEF*/()
\ No newline at end of file
+// new [|Util|]/*GOTO DEF*/()
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire2.baseline.jsonc
index d6658fec1e..6fca40c6cd 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire2.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire2.baseline.jsonc
@@ -5,4 +5,4 @@
// === /index.js ===
// const { Util } = require('./reexport');
-// new Util/*GOTO DEF*/()
\ No newline at end of file
+// new [|Util|]/*GOTO DEF*/()
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc
index 90392f6142..ebea7b18a8 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc
@@ -3,5 +3,5 @@
// [|export class Foo {}|]
// === /b.ts ===
-// import n = require('./a/*GOTO DEF*/');
+// import n = require([|'./a/*GOTO DEF*/'|]);
// var x = new n.Foo();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc
index 4453ae5b73..4cde76355a 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc
@@ -4,5 +4,5 @@
// export var x = 0;|]
// === /b.ts ===
-// import n = require('./a/*GOTO DEF*/');
+// import n = require([|'./a/*GOTO DEF*/'|]);
// var x = new n.Foo();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName3.baseline.jsonc
index 28f4ba1fd3..7ef08db995 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName3.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName3.baseline.jsonc
@@ -5,5 +5,5 @@
// }
// === /b.ts ===
-// import n = require('e/*GOTO DEF*/');
+// import n = require([|'e/*GOTO DEF*/'|]);
// var x = new n.Foo();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName6.baseline.jsonc
index 236ff22c0f..c5e63ec29c 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName6.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName6.baseline.jsonc
@@ -5,4 +5,4 @@
// }
// === /b.ts ===
-// import * from 'e/*GOTO DEF*/';
\ No newline at end of file
+// import * from [|'e/*GOTO DEF*/'|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName7.baseline.jsonc
index ebcad5e2ab..219047b3f8 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName7.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName7.baseline.jsonc
@@ -5,4 +5,4 @@
// }
// === /b.ts ===
-// import {Foo, Bar} from 'e/*GOTO DEF*/';
\ No newline at end of file
+// import {Foo, Bar} from [|'e/*GOTO DEF*/'|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName8.baseline.jsonc
index 8d0abed4ba..b4a146031d 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName8.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName8.baseline.jsonc
@@ -5,4 +5,4 @@
// }
// === /b.ts ===
-// export {Foo, Bar} from 'e/*GOTO DEF*/';
\ No newline at end of file
+// export {Foo, Bar} from [|'e/*GOTO DEF*/'|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName9.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName9.baseline.jsonc
index bc11061813..859742edf3 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName9.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName9.baseline.jsonc
@@ -5,4 +5,4 @@
// }
// === /b.ts ===
-// export * from 'e/*GOTO DEF*/';
\ No newline at end of file
+// export * from [|'e/*GOTO DEF*/'|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc
index b9281b2a4d..f44dbccce6 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc
@@ -3,4 +3,4 @@
// [|export const foo = 1;|]
// === /a.ts ===
-// import { foo } from "./b/*GOTO DEF*/";
\ No newline at end of file
+// import { foo } from [|"./b/*GOTO DEF*/"|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames.baseline.jsonc
index 5aa9446edb..3d35b62e8c 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames.baseline.jsonc
@@ -10,4 +10,4 @@
// }
// === /b.ts ===
-// export {/*GOTO DEF*/Class} from "./a";
\ No newline at end of file
+// export {/*GOTO DEF*/[|Class|]} from "./a";
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc
index 91440f77d1..2ff5f7768e 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc
@@ -7,4 +7,4 @@
// === /b.js ===
// const { Class } = require("./a");
-// /*GOTO DEF*/Class;
\ No newline at end of file
+// /*GOTO DEF*/[|Class|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc
index 7c4739fa58..d2d783b482 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc
@@ -7,4 +7,4 @@
// === /b.js ===
// const { Class } = require("./a");
-// /*GOTO DEF*/Class;
\ No newline at end of file
+// /*GOTO DEF*/[|Class|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames2.baseline.jsonc
index e78479c07d..598809ef9a 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames2.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames2.baseline.jsonc
@@ -10,4 +10,4 @@
// }
// === /b.ts ===
-// import {/*GOTO DEF*/Class} from "./a";
\ No newline at end of file
+// import {/*GOTO DEF*/[|Class|]} from "./a";
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc
index e203d7d28d..fd51a82e05 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc
@@ -11,7 +11,7 @@
// === /e.ts ===
// import {M, C, I} from "./d";
-// var c = new /*GOTO DEF*/C();
+// var c = new /*GOTO DEF*/[|C|]();
@@ -27,5 +27,5 @@
// }
// === /e.ts ===
-// import {M, /*GOTO DEF*/C, I} from "./d";
+// import {M, /*GOTO DEF*/[|C|], I} from "./d";
// var c = new C();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames4.baseline.jsonc
index 55509a2511..c1b316c27e 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames4.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames4.baseline.jsonc
@@ -10,4 +10,4 @@
// }
// === /b.ts ===
-// import {Class as /*GOTO DEF*/ClassAlias} from "./a";
\ No newline at end of file
+// import {Class as /*GOTO DEF*/[|ClassAlias|]} from "./a";
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames5.baseline.jsonc
index 0c0a65ec64..a104f69fec 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames5.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames5.baseline.jsonc
@@ -10,4 +10,4 @@
// }
// === /b.ts ===
-// export {Class as /*GOTO DEF*/ClassAlias} from "./a";
\ No newline at end of file
+// export {Class as /*GOTO DEF*/[|ClassAlias|]} from "./a";
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames6.baseline.jsonc
index af308bf7cf..2b0a63a571 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames6.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames6.baseline.jsonc
@@ -10,4 +10,4 @@
// }|]
// === /b.ts ===
-// import /*GOTO DEF*/alias = require("./a");
\ No newline at end of file
+// import /*GOTO DEF*/[|alias|] = require("./a");
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames7.baseline.jsonc
index 204b6ef767..1772549793 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames7.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames7.baseline.jsonc
@@ -6,4 +6,4 @@
// export default Class;
// === /b.ts ===
-// import /*GOTO DEF*/defaultExport from "./a";
\ No newline at end of file
+// import /*GOTO DEF*/[|defaultExport|] from "./a";
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames8.baseline.jsonc
index 438a28cd46..ac1d675989 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames8.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames8.baseline.jsonc
@@ -6,4 +6,4 @@
// export { Class };
// === /b.js ===
-// import { /*GOTO DEF*/Class } from "./a";
\ No newline at end of file
+// import { /*GOTO DEF*/[|Class|] } from "./a";
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames9.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames9.baseline.jsonc
index 54c06f70e2..b34785b6e5 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames9.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames9.baseline.jsonc
@@ -7,4 +7,4 @@
// === /b.js ===
// const { Class } = require("./a");
-// /*GOTO DEF*/Class;
\ No newline at end of file
+// /*GOTO DEF*/[|Class|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImports.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImports.baseline.jsonc
index ca6cb45455..37a47b3834 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImports.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImports.baseline.jsonc
@@ -9,7 +9,7 @@
// import b = require("./b");
// f;
// x;
-// /*GOTO DEF*/a;
+// /*GOTO DEF*/[|a|];
// b;
@@ -23,7 +23,7 @@
// import f, { x } from "./a";
// import * as a from "./a";
// import b = require("./b");
-// /*GOTO DEF*/f;
+// /*GOTO DEF*/[|f|];
// x;
// a;
// b;
@@ -40,7 +40,7 @@
// import * as a from "./a";
// import b = require("./b");
// f;
-// /*GOTO DEF*/x;
+// /*GOTO DEF*/[|x|];
// a;
// b;
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag4.baseline.jsonc
index ec17a66f3c..2f56e33af2 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag4.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag4.baseline.jsonc
@@ -4,5 +4,5 @@
// === /a.js ===
// /**
-// * @import { A/*GOTO DEF*/ } from "./b";
+// * @import { [|A|]/*GOTO DEF*/ } from "./b";
// */
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag5.baseline.jsonc
index 7e27cfb656..87c23cd752 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag5.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag5.baseline.jsonc
@@ -8,6 +8,6 @@
// */
//
// /**
-// * @param { A/*GOTO DEF*/ } a
+// * @param { [|A|]/*GOTO DEF*/ } a
// */
// function f(a) {}
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc
index b8416519af..6641bc56ec 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc
@@ -3,4 +3,4 @@
// [|module.exports = {};|]
// === /bar.js ===
-// var x = require(/*GOTO DEF*/"./foo");
\ No newline at end of file
+// var x = require(/*GOTO DEF*/[|"./foo"|]);
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc
index 7470cbd268..68d1f10270 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc
@@ -7,7 +7,7 @@
// module.exports.Blah = Blah;|]
// === /bar.js ===
-// const /*GOTO DEF*/BlahModule = require("./foo.js");
+// const /*GOTO DEF*/[|BlahModule|] = require("./foo.js");
// new BlahModule.Blah()
@@ -22,7 +22,7 @@
// === /bar.js ===
// const BlahModule = require("./foo.js");
-// new /*GOTO DEF*/BlahModule.Blah()
+// new /*GOTO DEF*/[|BlahModule|].Blah()
@@ -35,7 +35,7 @@
// module.exports.Blah = Blah;|]
// === /barTs.ts ===
-// import /*GOTO DEF*/BlahModule = require("./foo.js");
+// import /*GOTO DEF*/[|BlahModule|] = require("./foo.js");
// new BlahModule.Blah()
@@ -50,4 +50,4 @@
// === /barTs.ts ===
// import BlahModule = require("./foo.js");
-// new /*GOTO DEF*/BlahModule.Blah()
\ No newline at end of file
+// new /*GOTO DEF*/[|BlahModule|].Blah()
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxNotSet.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxNotSet.baseline.jsonc
index dd6576d397..a5e3eb6877 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxNotSet.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxNotSet.baseline.jsonc
@@ -7,4 +7,4 @@
// === /bar.jsx ===
// import Foo from './foo';
-// const a = *GOTO DEF*/Foo />
\ No newline at end of file
+// const a = *GOTO DEF*/[|Foo|] />
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMultipleDefinitions.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMultipleDefinitions.baseline.jsonc
index 34a3582173..97686bd343 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMultipleDefinitions.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMultipleDefinitions.baseline.jsonc
@@ -29,4 +29,4 @@
// }
// === /e.ts ===
-// Modul/*GOTO DEF*/e;
\ No newline at end of file
+// [|Modul/*GOTO DEF*/e|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember8.baseline.jsonc
index fc104d7433..f19fc5db40 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember8.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember8.baseline.jsonc
@@ -7,5 +7,5 @@
// === /b.ts ===
// import { A } from "./a";
// class B extends A {
-// /*GOTO DEF*/override m() {}
+// /*GOTO DEF*/[|override|] m() {}
// }
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty01.baseline.jsonc
index b447aab88a..6af236d0da 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty01.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty01.baseline.jsonc
@@ -3,7 +3,7 @@
// var name = "hello";
// var id = 100000;
// declare var id;
-// var obj = {/*GOTO DEF*/name, id};
+// var obj = {/*GOTO DEF*/[|name|], id};
// obj.name;
// obj.id;
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSignatureAlias_require.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSignatureAlias_require.baseline.jsonc
index 9af12dce90..0e0342a473 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSignatureAlias_require.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSignatureAlias_require.baseline.jsonc
@@ -4,7 +4,7 @@
// === /b.js ===
// const f = require("./a");
-// /*GOTO DEF*/f();
+// /*GOTO DEF*/[|f|]();
@@ -14,4 +14,4 @@
// === /bar.ts ===
// import f = require("./a");
-// /*GOTO DEF*/f();
\ No newline at end of file
+// /*GOTO DEF*/[|f|]();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc
index 78b467b720..989c0c9967 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc
@@ -3,7 +3,7 @@
// class [|c|] { }
// === /Consumption.ts ===
-// var n = new /*GOTO DEF*/c();
+// var n = new /*GOTO DEF*/[|c|]();
// var n = new c();
@@ -14,4 +14,4 @@
// === /Consumption.ts ===
// var n = new c();
-// var n = new c/*GOTO DEF*/();
\ No newline at end of file
+// var n = new [|c|]/*GOTO DEF*/();
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeOnlyImport.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeOnlyImport.baseline.jsonc
index f6994cecfe..b214099640 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeOnlyImport.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeOnlyImport.baseline.jsonc
@@ -5,4 +5,4 @@
// === /c.ts ===
// import type { SyntaxKind } from './b';
-// let kind: /*GOTO DEF*/SyntaxKind;
\ No newline at end of file
+// let kind: /*GOTO DEF*/[|SyntaxKind|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToTypeDefinition4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToTypeDefinition4.baseline.jsonc
index a639362681..1b63927bb4 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/goToTypeDefinition4.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/goToTypeDefinition4.baseline.jsonc
@@ -5,4 +5,4 @@
// === /bar.ts ===
// import { T } from "./foo";
-// let x: /*GOTO DEF*/T;
\ No newline at end of file
+// let x: /*GOTO DEF*/[|T|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/goToDefinition/importTypeNodeGoToDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/importTypeNodeGoToDefinition.baseline.jsonc
index f551165273..9451561245 100644
--- a/testdata/baselines/reference/fourslash/goToDefinition/importTypeNodeGoToDefinition.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/goToDefinition/importTypeNodeGoToDefinition.baseline.jsonc
@@ -7,7 +7,7 @@
// }|]
// === /usage.ts ===
-// type A = typeof import(/*GOTO DEF*/"./ns").Foo.Bar;
+// type A = typeof import(/*GOTO DEF*/[|"./ns"|]).Foo.Bar;
// type B = import("./ns").Foo.Bar.Baz;
@@ -21,7 +21,7 @@
// }
// === /usage.ts ===
-// type A = typeof import("./ns")./*GOTO DEF*/Foo.Bar;
+// type A = typeof import("./ns")./*GOTO DEF*/[|Foo|].Bar;
// type B = import("./ns").Foo.Bar.Baz;
@@ -35,7 +35,7 @@
// }
// === /usage.ts ===
-// type A = typeof import("./ns").Foo./*GOTO DEF*/Bar;
+// type A = typeof import("./ns").Foo./*GOTO DEF*/[|Bar|];
// type B = import("./ns").Foo.Bar.Baz;
@@ -50,7 +50,7 @@
// === /usage.ts ===
// type A = typeof import("./ns").Foo.Bar;
-// type B = import(/*GOTO DEF*/"./ns").Foo.Bar.Baz;
+// type B = import(/*GOTO DEF*/[|"./ns"|]).Foo.Bar.Baz;
@@ -64,7 +64,7 @@
// === /usage.ts ===
// type A = typeof import("./ns").Foo.Bar;
-// type B = import("./ns")./*GOTO DEF*/Foo.Bar.Baz;
+// type B = import("./ns")./*GOTO DEF*/[|Foo|].Bar.Baz;
@@ -78,7 +78,7 @@
// === /usage.ts ===
// type A = typeof import("./ns").Foo.Bar;
-// type B = import("./ns").Foo./*GOTO DEF*/Bar.Baz;
+// type B = import("./ns").Foo./*GOTO DEF*/[|Bar|].Baz;
@@ -92,4 +92,4 @@
// === /usage.ts ===
// type A = typeof import("./ns").Foo.Bar;
-// type B = import("./ns").Foo.Bar./*GOTO DEF*/Baz;
\ No newline at end of file
+// type B = import("./ns").Foo.Bar./*GOTO DEF*/[|Baz|];
\ No newline at end of file