diff --git a/internal/fourslash/_scripts/failingTests.txt b/internal/fourslash/_scripts/failingTests.txt
index ba8455a9097..b46d44526c9 100644
--- a/internal/fourslash/_scripts/failingTests.txt
+++ b/internal/fourslash/_scripts/failingTests.txt
@@ -334,7 +334,6 @@ TestImportNameCodeFixExistingImport11
TestImportNameCodeFixExistingImport8
TestImportNameCodeFixExistingImport9
TestImportNameCodeFixExistingImportEquals0
-TestImportNameCodeFixExportAsDefault
TestImportNameCodeFixNewImportAmbient1
TestImportNameCodeFixNewImportAmbient3
TestImportNameCodeFixNewImportBaseUrl0
diff --git a/internal/fourslash/_scripts/manualTests.txt b/internal/fourslash/_scripts/manualTests.txt
index e3039bca188..5b5819ae702 100644
--- a/internal/fourslash/_scripts/manualTests.txt
+++ b/internal/fourslash/_scripts/manualTests.txt
@@ -1,7 +1,14 @@
+autoImportPackageRootPathTypeModule
completionListInClosedFunction05
+completionListWithLabel
completionsAtIncompleteObjectLiteralProperty
+completionsImport_defaultAndNamedConflict
+completionsImport_filteredByPackageJson_ambient
+completionsImport_reExportDefault
+completionsImport_reexportTransient
completionsSelfDeclaring1
completionsWithDeprecatedTag4
+formatOnEnterInComment
duplicatePackageServices_fileChanges
navigationBarFunctionPrototype
navigationBarFunctionPrototype2
@@ -17,28 +24,24 @@ navto_excludeLib1
navto_excludeLib2
navto_excludeLib4
navto_serverExcludeLib
+outliningForNonCompleteInterfaceDeclaration
+outliningHintSpansForFunction
parserCorruptionAfterMapInClass
quickInfoForOverloadOnConst1
renameDefaultKeyword
renameForDefaultExport01
+semicolonFormattingInsideAComment
+semicolonFormattingInsideAStringLiteral
tsxCompletion12
-completionsImport_reExportDefault
-completionsImport_reexportTransient
jsDocFunctionSignatures2
jsDocFunctionSignatures12
-outliningHintSpansForFunction
getOutliningSpans
-outliningForNonCompleteInterfaceDeclaration
incrementalParsingWithJsDoc
autoCloseFragment
autoCloseTag
-autoImportPackageRootPathTypeModule
-completionListWithLabel
-completionsImport_defaultAndNamedConflict
completionsWithStringReplacementMode1
jsdocParameterNameCompletion
stringLiteralCompletionsInPositionTypedUsingRest
importNameCodeFix_uriStyleNodeCoreModules1
-completionsImport_filteredByPackageJson_ambient
importNameCodeFixDefaultExport7
importNameCodeFixOptionalImport0
diff --git a/internal/fourslash/test_parser.go b/internal/fourslash/test_parser.go
index 4187d1c8ceb..1a4720add3a 100644
--- a/internal/fourslash/test_parser.go
+++ b/internal/fourslash/test_parser.go
@@ -215,6 +215,7 @@ const (
func parseFileContent(fileName string, content string, fileOptions map[string]string) (*testFileWithMarkers, error) {
fileName = tspath.GetNormalizedAbsolutePath(fileName, "/")
+ content = chompLeadingSpace(content)
// The file content (minus metacharacters) so far
var output strings.Builder
@@ -466,6 +467,23 @@ func reportError(fileName string, line int, col int, message string) error {
return &fourslashError{fmt.Sprintf("%v (%v,%v): %v", fileName, line, col, message)}
}
+func chompLeadingSpace(content string) string {
+ lines := strings.Split(content, "\n")
+ for _, line := range lines {
+ if len(line) > 0 && line[0] != ' ' {
+ return content
+ }
+ }
+
+ result := make([]string, len(lines))
+ for i, line := range lines {
+ if len(line) > 0 {
+ result[i] = line[1:]
+ }
+ }
+ return strings.Join(result, "\n")
+}
+
type fourslashError struct {
err string
}
diff --git a/internal/fourslash/tests/gen/formatOnEnterInComment_test.go b/internal/fourslash/tests/manual/formatOnEnterInComment_test.go
similarity index 87%
rename from internal/fourslash/tests/gen/formatOnEnterInComment_test.go
rename to internal/fourslash/tests/manual/formatOnEnterInComment_test.go
index 756906b43d0..4fabd64cb5e 100644
--- a/internal/fourslash/tests/gen/formatOnEnterInComment_test.go
+++ b/internal/fourslash/tests/manual/formatOnEnterInComment_test.go
@@ -8,12 +8,11 @@ import (
)
func TestFormatOnEnterInComment(t *testing.T) {
- fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = ` /**
- * /*1*/
- */`
+ const content = ` /**
+ * /*1*/
+ */`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.GoToMarker(t, "1")
diff --git a/internal/fourslash/tests/gen/semicolonFormattingInsideAComment_test.go b/internal/fourslash/tests/manual/semicolonFormattingInsideAComment_test.go
similarity index 89%
rename from internal/fourslash/tests/gen/semicolonFormattingInsideAComment_test.go
rename to internal/fourslash/tests/manual/semicolonFormattingInsideAComment_test.go
index 9731a43eeaf..27b5f0dee4b 100644
--- a/internal/fourslash/tests/gen/semicolonFormattingInsideAComment_test.go
+++ b/internal/fourslash/tests/manual/semicolonFormattingInsideAComment_test.go
@@ -8,10 +8,9 @@ import (
)
func TestSemicolonFormattingInsideAComment(t *testing.T) {
- fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = ` ///**/`
+ const content = ` ///**/`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.GoToMarker(t, "")
diff --git a/internal/fourslash/tests/gen/semicolonFormattingInsideAStringLiteral_test.go b/internal/fourslash/tests/manual/semicolonFormattingInsideAStringLiteral_test.go
similarity index 87%
rename from internal/fourslash/tests/gen/semicolonFormattingInsideAStringLiteral_test.go
rename to internal/fourslash/tests/manual/semicolonFormattingInsideAStringLiteral_test.go
index e8e854b85e5..f138bfb2edf 100644
--- a/internal/fourslash/tests/gen/semicolonFormattingInsideAStringLiteral_test.go
+++ b/internal/fourslash/tests/manual/semicolonFormattingInsideAStringLiteral_test.go
@@ -8,10 +8,9 @@ import (
)
func TestSemicolonFormattingInsideAStringLiteral(t *testing.T) {
- fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = ` var x = "string/**/`
+ const content = ` var x = "string/**/`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.GoToMarker(t, "")
diff --git a/internal/ls/definition.go b/internal/ls/definition.go
index e6ec8fa50ec..8e49d610243 100644
--- a/internal/ls/definition.go
+++ b/internal/ls/definition.go
@@ -9,6 +9,7 @@ import (
"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/ls/lsconv"
"github.com/microsoft/typescript-go/internal/lsp/lsproto"
"github.com/microsoft/typescript-go/internal/scanner"
)
@@ -22,24 +23,31 @@ func (l *LanguageService) ProvideDefinition(
clientSupportsLink := caps.TextDocument.Definition.LinkSupport
program, file := l.getProgramAndFile(documentURI)
- node := astnav.GetTouchingPropertyName(file, int(l.converters.LineAndCharacterToPosition(file, position)))
+ pos := int(l.converters.LineAndCharacterToPosition(file, position))
+ node := astnav.GetTouchingPropertyName(file, pos)
+ reference := getReferenceAtPosition(file, pos, program)
+
if node.Kind == ast.KindSourceFile {
return lsproto.LocationOrLocationsOrDefinitionLinksOrNull{}, nil
}
+
originSelectionRange := l.createLspRangeFromNode(node, file)
+ if reference != nil && reference.file != nil {
+ return l.createDefinitionLocations(originSelectionRange, clientSupportsLink, []*ast.Node{}, reference), nil
+ }
c, done := program.GetTypeCheckerForFile(ctx, file)
defer done()
if node.Kind == ast.KindOverrideKeyword {
if sym := getSymbolForOverriddenMember(c, node); sym != nil {
- return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, sym.Declarations), nil
+ return l.createDefinitionLocations(originSelectionRange, clientSupportsLink, sym.Declarations, nil /*reference*/), nil
}
}
if ast.IsJumpStatementTarget(node) {
if label := getTargetLabel(node.Parent, node.Text()); label != nil {
- return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, []*ast.Node{label}), nil
+ return l.createDefinitionLocations(originSelectionRange, clientSupportsLink, []*ast.Node{label}, nil /*reference*/), nil
}
}
@@ -52,7 +60,7 @@ func (l *LanguageService) ProvideDefinition(
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(originSelectionRange, clientSupportsLink, []*ast.Node{fn}), nil
+ return l.createDefinitionLocations(originSelectionRange, clientSupportsLink, []*ast.Node{fn}, nil /*reference*/), nil
}
}
@@ -63,7 +71,7 @@ func (l *LanguageService) ProvideDefinition(
nonFunctionDeclarations := core.Filter(slices.Clip(declarations), func(node *ast.Node) bool { return !ast.IsFunctionLike(node) })
declarations = append(nonFunctionDeclarations, calledDeclaration)
}
- return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, declarations), nil
+ return l.createDefinitionLocations(originSelectionRange, clientSupportsLink, declarations, reference), nil
}
func (l *LanguageService) ProvideTypeDefinition(
@@ -93,10 +101,10 @@ func (l *LanguageService) ProvideTypeDefinition(
declarations = core.Concatenate(getDeclarationsFromType(typeArgument), declarations)
}
if len(declarations) != 0 {
- return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, declarations), nil
+ return l.createDefinitionLocations(originSelectionRange, clientSupportsLink, declarations, nil /*reference*/), nil
}
if symbol.Flags&ast.SymbolFlagsValue == 0 && symbol.Flags&ast.SymbolFlagsType != 0 {
- return l.createLocationsFromDeclarations(originSelectionRange, clientSupportsLink, symbol.Declarations), nil
+ return l.createDefinitionLocations(originSelectionRange, clientSupportsLink, symbol.Declarations, nil /*reference*/), nil
}
}
@@ -121,13 +129,34 @@ type fileRange struct {
fileRange core.TextRange
}
-func (l *LanguageService) createLocationsFromDeclarations(
+func (l *LanguageService) createDefinitionLocations(
originSelectionRange *lsproto.Range,
clientSupportsLink bool,
declarations []*ast.Node,
+ reference *refInfo,
) lsproto.DefinitionResponse {
- locations := make([]*lsproto.LocationLink, 0, len(declarations))
+ locations := make([]*lsproto.LocationLink, 0)
locationRanges := collections.Set[fileRange]{}
+
+ if reference != nil {
+ targetRange := lsproto.Range{
+ Start: lsproto.Position{
+ Line: 0,
+ Character: 0,
+ },
+ End: lsproto.Position{
+ Line: 0,
+ Character: 0,
+ },
+ }
+ locations = append(locations, &lsproto.LocationLink{
+ OriginSelectionRange: originSelectionRange,
+ TargetUri: lsconv.FileNameToDocumentURI(reference.fileName),
+ TargetRange: targetRange,
+ TargetSelectionRange: targetRange,
+ })
+ }
+
for _, decl := range declarations {
file := ast.GetSourceFileOfNode(decl)
fileName := file.FileName()
@@ -146,10 +175,11 @@ func (l *LanguageService) createLocationsFromDeclarations(
})
}
}
- if !clientSupportsLink {
- return createLocationsFromLinks(locations)
+
+ if clientSupportsLink {
+ return lsproto.LocationOrLocationsOrDefinitionLinksOrNull{DefinitionLinks: &locations}
}
- return lsproto.LocationOrLocationsOrDefinitionLinksOrNull{DefinitionLinks: &locations}
+ return createLocationsFromLinks(locations)
}
func createLocationsFromLinks(links []*lsproto.LocationLink) lsproto.DefinitionResponse {
diff --git a/internal/ls/findallreferences.go b/internal/ls/findallreferences.go
index f098867efd6..e6df0ef6f3c 100644
--- a/internal/ls/findallreferences.go
+++ b/internal/ls/findallreferences.go
@@ -1451,55 +1451,6 @@ func (l *LanguageService) getReferencedSymbolsForModule(ctx context.Context, pro
return []*SymbolAndEntries{}
}
-func getReferenceAtPosition(sourceFile *ast.SourceFile, position int, program *compiler.Program) *refInfo {
- if referencePath := findReferenceInPosition(sourceFile.ReferencedFiles, position); referencePath != nil {
- if file := program.GetSourceFileFromReference(sourceFile, referencePath); file != nil {
- return &refInfo{reference: referencePath, fileName: file.FileName(), file: file, unverified: false}
- }
- return nil
- }
-
- if typeReferenceDirective := findReferenceInPosition(sourceFile.TypeReferenceDirectives, position); typeReferenceDirective != nil {
- if reference := program.GetResolvedTypeReferenceDirectiveFromTypeReferenceDirective(typeReferenceDirective, sourceFile); reference != nil {
- if file := program.GetSourceFile(reference.ResolvedFileName); file != nil {
- return &refInfo{reference: typeReferenceDirective, fileName: file.FileName(), file: file, unverified: false}
- }
- }
- return nil
- }
-
- if libReferenceDirective := findReferenceInPosition(sourceFile.LibReferenceDirectives, position); libReferenceDirective != nil {
- if file := program.GetLibFileFromReference(libReferenceDirective); file != nil {
- return &refInfo{reference: libReferenceDirective, fileName: file.FileName(), file: file, unverified: false}
- }
- return nil
- }
-
- if len(sourceFile.Imports()) == 0 && len(sourceFile.ModuleAugmentations) == 0 {
- return nil
- }
-
- node := astnav.GetTouchingToken(sourceFile, position)
- if !isModuleSpecifierLike(node) || !tspath.IsExternalModuleNameRelative(node.Text()) {
- return nil
- }
- if resolution := program.GetResolvedModuleFromModuleSpecifier(sourceFile, node); resolution != nil {
- verifiedFileName := resolution.ResolvedFileName
- fileName := resolution.ResolvedFileName
- if fileName == "" {
- fileName = tspath.ResolvePath(tspath.GetDirectoryPath(sourceFile.FileName()), node.Text())
- }
- return &refInfo{
- file: program.GetSourceFile(fileName),
- fileName: fileName,
- reference: nil,
- unverified: verifiedFileName != "",
- }
- }
-
- return nil
-}
-
// -- Core algorithm for find all references --
func getSpecialSearchKind(node *ast.Node) string {
if node == nil {
diff --git a/internal/ls/utilities.go b/internal/ls/utilities.go
index 3a4989fc705..c860c72bfca 100644
--- a/internal/ls/utilities.go
+++ b/internal/ls/utilities.go
@@ -10,6 +10,7 @@ import (
"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/compiler"
"github.com/microsoft/typescript-go/internal/core"
"github.com/microsoft/typescript-go/internal/debug"
"github.com/microsoft/typescript-go/internal/jsnum"
@@ -18,6 +19,7 @@ import (
"github.com/microsoft/typescript-go/internal/lsp/lsproto"
"github.com/microsoft/typescript-go/internal/scanner"
"github.com/microsoft/typescript-go/internal/stringutil"
+ "github.com/microsoft/typescript-go/internal/tspath"
)
var quoteReplacer = strings.NewReplacer("'", `\'`, `\"`, `"`)
@@ -1484,6 +1486,56 @@ func toContextRange(textRange *core.TextRange, contextFile *ast.SourceFile, cont
return nil
}
+func getReferenceAtPosition(sourceFile *ast.SourceFile, position int, program *compiler.Program) *refInfo {
+ if referencePath := findReferenceInPosition(sourceFile.ReferencedFiles, position); referencePath != nil {
+ if file := program.GetSourceFileFromReference(sourceFile, referencePath); file != nil {
+ return &refInfo{reference: referencePath, fileName: file.FileName(), file: file, unverified: false}
+ }
+ return nil
+ }
+
+ if typeReferenceDirective := findReferenceInPosition(sourceFile.TypeReferenceDirectives, position); typeReferenceDirective != nil {
+ if reference := program.GetResolvedTypeReferenceDirectiveFromTypeReferenceDirective(typeReferenceDirective, sourceFile); reference != nil {
+ if file := program.GetSourceFile(reference.ResolvedFileName); file != nil {
+ return &refInfo{reference: typeReferenceDirective, fileName: file.FileName(), file: file, unverified: false}
+ }
+ }
+ return nil
+ }
+
+ if libReferenceDirective := findReferenceInPosition(sourceFile.LibReferenceDirectives, position); libReferenceDirective != nil {
+ if file := program.GetLibFileFromReference(libReferenceDirective); file != nil {
+ return &refInfo{reference: libReferenceDirective, fileName: file.FileName(), file: file, unverified: false}
+ }
+ return nil
+ }
+
+ if len(sourceFile.Imports()) == 0 && len(sourceFile.ModuleAugmentations) == 0 {
+ return nil
+ }
+
+ node := astnav.GetTouchingToken(sourceFile, position)
+ if !isModuleSpecifierLike(node) || !tspath.IsExternalModuleNameRelative(node.Text()) {
+ return nil
+ }
+
+ if resolution := program.GetResolvedModuleFromModuleSpecifier(sourceFile, node); resolution != nil {
+ verifiedFileName := resolution.ResolvedFileName
+ fileName := resolution.ResolvedFileName
+ if fileName == "" {
+ fileName = tspath.ResolvePath(tspath.GetDirectoryPath(sourceFile.FileName()), node.Text())
+ }
+ return &refInfo{
+ file: program.GetSourceFile(fileName),
+ fileName: fileName,
+ reference: nil,
+ unverified: verifiedFileName != "",
+ }
+ }
+
+ return nil
+}
+
func ptrTo[T any](v T) *T {
return &v
}
diff --git a/testdata/baselines/reference/fourslash/documentHighlights/findAllRefsForModule.baseline.jsonc b/testdata/baselines/reference/fourslash/documentHighlights/findAllRefsForModule.baseline.jsonc
index fbd7faf7362..c3259d6a17a 100644
--- a/testdata/baselines/reference/fourslash/documentHighlights/findAllRefsForModule.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/documentHighlights/findAllRefsForModule.baseline.jsonc
@@ -12,4 +12,4 @@
// === documentHighlights ===
// === /d.ts ===
-// ///
\ No newline at end of file
+// ///
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForModule.baseline.jsonc
index 8173e6641a9..58001c8fda9 100644
--- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForModule.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForModule.baseline.jsonc
@@ -6,7 +6,7 @@
// const a = require("[|../a|]");
// === /d.ts ===
-// ///
+// ///
@@ -18,7 +18,7 @@
// const a = require("/*FIND ALL REFS*/[|../a|]");
// === /d.ts ===
-// ///
+// ///
@@ -30,4 +30,4 @@
// const a = require("[|../a|]");
// === /d.ts ===
-// ///
\ No newline at end of file
+// ///
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStarAs.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStarAs.baseline.jsonc
index 22a217bed31..e6bb70f509a 100644
--- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStarAs.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStarAs.baseline.jsonc
@@ -1,7 +1,7 @@
// === findAllReferences ===
// === /importing.ts ===
-// import { Leaf } from './exporting';
-// Leaf.[|hello|]()
+// import { Leaf } from './exporting';
+// Leaf.[|hello|]()
// === /leafModule.ts ===
// export const /*FIND ALL REFS*/[|hello|] = () => 'Hello';
@@ -10,8 +10,8 @@
// === findAllReferences ===
// === /importing.ts ===
-// import { Leaf } from './exporting';
-// Leaf./*FIND ALL REFS*/[|hello|]()
+// import { Leaf } from './exporting';
+// Leaf./*FIND ALL REFS*/[|hello|]()
// === /leafModule.ts ===
// export const [|hello|] = () => 'Hello';
@@ -23,8 +23,8 @@
// export * as /*FIND ALL REFS*/[|Leaf|] from './leafModule';
// === /importing.ts ===
-// import { [|Leaf|] } from './exporting';
-// [|Leaf|].hello()
+// import { [|Leaf|] } from './exporting';
+// [|Leaf|].hello()
@@ -33,8 +33,8 @@
// export * as [|Leaf|] from './leafModule';
// === /importing.ts ===
-// import { /*FIND ALL REFS*/[|Leaf|] } from './exporting';
-// [|Leaf|].hello()
+// import { /*FIND ALL REFS*/[|Leaf|] } from './exporting';
+// [|Leaf|].hello()
@@ -43,5 +43,5 @@
// export * as [|Leaf|] from './leafModule';
// === /importing.ts ===
-// import { [|Leaf|] } from './exporting';
-// /*FIND ALL REFS*/[|Leaf|].hello()
\ No newline at end of file
+// import { [|Leaf|] } from './exporting';
+// /*FIND ALL REFS*/[|Leaf|].hello()
\ No newline at end of file
diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeywordMultipleFiles.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeywordMultipleFiles.baseline.jsonc
index 1864e0a2c20..d0d68ecf4ae 100644
--- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeywordMultipleFiles.baseline.jsonc
+++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeywordMultipleFiles.baseline.jsonc
@@ -26,30 +26,30 @@
// === findAllReferences ===
// === /file3.ts ===
-// ((x = /*FIND ALL REFS*/[|this|], y) => [|this|])([|this|], [|this|]);
-// // different 'this'
-// function f(this) { return this; }
+// ((x = /*FIND ALL REFS*/[|this|], y) => [|this|])([|this|], [|this|]);
+// // different 'this'
+// function f(this) { return this; }
// === findAllReferences ===
// === /file3.ts ===
-// ((x = [|this|], y) => /*FIND ALL REFS*/[|this|])([|this|], [|this|]);
-// // different 'this'
-// function f(this) { return this; }
+// ((x = [|this|], y) => /*FIND ALL REFS*/[|this|])([|this|], [|this|]);
+// // different 'this'
+// function f(this) { return this; }
// === findAllReferences ===
// === /file3.ts ===
-// ((x = [|this|], y) => [|this|])(/*FIND ALL REFS*/[|this|], [|this|]);
-// // different 'this'
-// function f(this) { return this; }
+// ((x = [|this|], y) => [|this|])(/*FIND ALL REFS*/[|this|], [|this|]);
+// // different 'this'
+// function f(this) { return this; }
// === findAllReferences ===
// === /file3.ts ===
-// ((x = [|this|], y) => [|this|])([|this|], /*FIND ALL REFS*/[|this|]);
-// // different 'this'
-// function f(this) { return this; }
\ No newline at end of file
+// ((x = [|this|], y) => [|this|])([|this|], /*FIND ALL REFS*/[|this|]);
+// // different 'this'
+// function f(this) { return this; }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition.baseline.jsonc
index ebea7b18a86..fae2788756e 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition.baseline.jsonc
@@ -1,6 +1,6 @@
// === goToDefinition ===
// === /a.ts ===
-// [|export class Foo {}|]
+// [||]export class Foo {}
// === /b.ts ===
// import n = require([|'./a/*GOTO DEF*/'|]);
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition.baseline.jsonc.diff
deleted file mode 100644
index 34b440e2ca5..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition.baseline.jsonc.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.definition.baseline.jsonc
-+++ new.definition.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /a.ts ===
--// [||]export class Foo {}
-+// [|export class Foo {}|]
-
- // === /b.ts ===
- // import n = require([|'./a/*GOTO DEF*/'|]);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition01.baseline.jsonc
index ebea7b18a86..fae2788756e 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition01.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition01.baseline.jsonc
@@ -1,6 +1,6 @@
// === goToDefinition ===
// === /a.ts ===
-// [|export class Foo {}|]
+// [||]export class Foo {}
// === /b.ts ===
// import n = require([|'./a/*GOTO DEF*/'|]);
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition01.baseline.jsonc.diff
deleted file mode 100644
index 66a4d9300b4..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/definition01.baseline.jsonc.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.definition01.baseline.jsonc
-+++ new.definition01.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /a.ts ===
--// [||]export class Foo {}
-+// [|export class Foo {}|]
-
- // === /b.ts ===
- // import n = require([|'./a/*GOTO DEF*/'|]);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc
index b3238a15d65..ab39b6b3ae9 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc
@@ -1,4 +1,7 @@
// === goToDefinition ===
+// === /index.css ===
+// [||]html { font-size: 16px; }
+
// === /types.ts ===
// <|declare module [|"*.css"|] {
// const styles: any;
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc.diff
deleted file mode 100644
index 9eae1385ea6..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.goToDefinitionCSSPatternAmbientModule.baseline.jsonc
-+++ new.goToDefinitionCSSPatternAmbientModule.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
--// === /index.css ===
--// [||]html { font-size: 16px; }
--
- // === /types.ts ===
- // <|declare module [|"*.css"|] {
- // const styles: any;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc
index 5398cf1c123..78cb0257fd8 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc
@@ -1,13 +1,13 @@
// === goToDefinition ===
// === /foo.ts ===
-// [|export function foo() { return "foo"; }
+// [||]export function foo() { return "foo"; }
// import("./f/*GOTO DEF*/oo")
-// var x = import("./foo")|]
+// var x = import("./foo")
// === goToDefinition ===
// === /foo.ts ===
-// [|export function foo() { return "foo"; }
+// [||]export function foo() { return "foo"; }
// import("./foo")
-// var x = import("./fo/*GOTO DEF*/o")|]
\ No newline at end of file
+// var x = import("./fo/*GOTO DEF*/o")
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc.diff
deleted file mode 100644
index d18d4e0e545..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc.diff
+++ /dev/null
@@ -1,20 +0,0 @@
---- old.goToDefinitionDynamicImport1.baseline.jsonc
-+++ new.goToDefinitionDynamicImport1.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /foo.ts ===
--// [||]export function foo() { return "foo"; }
-+// [|export function foo() { return "foo"; }
- // import("./f/*GOTO DEF*/oo")
--// var x = import("./foo")
-+// var x = import("./foo")|]
-
-
-
- // === goToDefinition ===
- // === /foo.ts ===
--// [||]export function foo() { return "foo"; }
-+// [|export function foo() { return "foo"; }
- // import("./foo")
--// var x = import("./fo/*GOTO DEF*/o")
-+// var x = import("./fo/*GOTO DEF*/o")|]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc
index ebea7b18a86..fae2788756e 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc
@@ -1,6 +1,6 @@
// === goToDefinition ===
// === /a.ts ===
-// [|export class Foo {}|]
+// [||]export class Foo {}
// === /b.ts ===
// import n = require([|'./a/*GOTO DEF*/'|]);
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc.diff
deleted file mode 100644
index 7bdd645b849..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.goToDefinitionExternalModuleName.baseline.jsonc
-+++ new.goToDefinitionExternalModuleName.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /a.ts ===
--// [||]export class Foo {}
-+// [|export class Foo {}|]
-
- // === /b.ts ===
- // import n = require([|'./a/*GOTO DEF*/'|]);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc
index 4cde76355ab..9af3cef72bc 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc
@@ -1,7 +1,7 @@
// === goToDefinition ===
// === /a.ts ===
-// [|class Foo {}
-// export var x = 0;|]
+// [||]class Foo {}
+// export var x = 0;
// === /b.ts ===
// import n = require([|'./a/*GOTO DEF*/'|]);
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc.diff
deleted file mode 100644
index 674f3342a11..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- old.goToDefinitionExternalModuleName2.baseline.jsonc
-+++ new.goToDefinitionExternalModuleName2.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /a.ts ===
--// [||]class Foo {}
--// export var x = 0;
-+// [|class Foo {}
-+// export var x = 0;|]
-
- // === /b.ts ===
- // import n = require([|'./a/*GOTO DEF*/'|]);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc
index f44dbccce67..70e7bcfc257 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc
@@ -1,6 +1,6 @@
// === goToDefinition ===
// === /b.ts ===
-// [|export const foo = 1;|]
+// [||]export const foo = 1;
// === /a.ts ===
// import { foo } from [|"./b/*GOTO DEF*/"|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc.diff
deleted file mode 100644
index a34d57636af..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.goToDefinitionImport1.baseline.jsonc
-+++ new.goToDefinitionImport1.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /b.ts ===
--// [||]export const foo = 1;
-+// [|export const foo = 1;|]
-
- // === /a.ts ===
- // import { foo } from [|"./b/*GOTO DEF*/"|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc
index dc1b4bddadb..99aa18bed5e 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc
@@ -1,9 +1,9 @@
// === goToDefinition ===
// === /a.js ===
-// class Class {
-// f;
-// }
-// <|module.exports.[|Class|] = Class|>;
+// class Class {
+// f;
+// }
+// <|module.exports.[|Class|] = Class|>;
// === /b.js ===
// const { Class } = require("./a");
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc.diff
index c02768f0670..9de0cc975ca 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc.diff
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc.diff
@@ -4,13 +4,12 @@
// === goToDefinition ===
// === /a.js ===
-// <|class [|Class|] {
--// f;
++// class Class {
+ // f;
-// }|>
-// module.exports.Class = Class;
-+// class Class {
-+// f;
-+// }
-+// <|module.exports.[|Class|] = Class|>;
++// }
++// <|module.exports.[|Class|] = Class|>;
// === /b.js ===
// const { Class } = require("./a");
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc
index d2d783b4824..a680949be89 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc
@@ -1,9 +1,9 @@
// === goToDefinition ===
// === /a.js ===
-// class Class {
-// f;
-// }
-// module.exports = { [|Class|] };
+// class Class {
+// f;
+// }
+// module.exports = { [|Class|] };
// === /b.js ===
// const { Class } = require("./a");
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc.diff
index b5aae22c14b..5280f6712f3 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc.diff
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc.diff
@@ -4,13 +4,12 @@
// === goToDefinition ===
// === /a.js ===
-// <|class [|Class|] {
--// f;
++// class Class {
+ // f;
-// }|>
-// module.exports = { Class };
-+// class Class {
-+// f;
-+// }
-+// module.exports = { [|Class|] };
++// }
++// module.exports = { [|Class|] };
// === /b.js ===
// const { Class } = require("./a");
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc
index f2055ab948a..94cc06f3465 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc
@@ -10,8 +10,8 @@
// }
// === /e.ts ===
-// import {M, C, I} from "./d";
-// var c = new /*GOTO DEF*/[|C|]();
+// import {M, C, I} from "./d";
+// var c = new /*GOTO DEF*/[|C|]();
@@ -27,5 +27,5 @@
// }
// === /e.ts ===
-// import {M, /*GOTO DEF*/[|C|], I} from "./d";
-// var c = new C();
\ No newline at end of file
+// import {M, /*GOTO DEF*/[|C|], I} from "./d";
+// var c = new C();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc.diff
deleted file mode 100644
index bc5c47278ef..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc.diff
+++ /dev/null
@@ -1,21 +0,0 @@
---- old.goToDefinitionImportedNames3.baseline.jsonc
-+++ new.goToDefinitionImportedNames3.baseline.jsonc
-@@= skipped -9, +9 lines =@@
- // }
-
- // === /e.ts ===
--// import {M, C, I} from "./d";
--// var c = new /*GOTO DEF*/[|C|]();
-+// import {M, C, I} from "./d";
-+// var c = new /*GOTO DEF*/[|C|]();
-
-
-
-@@= skipped -17, +17 lines =@@
- // }
-
- // === /e.ts ===
--// import {M, /*GOTO DEF*/[|C|], I} from "./d";
--// var c = new C();
-+// import {M, /*GOTO DEF*/[|C|], I} from "./d";
-+// var c = new C();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc
index 6641bc56ec2..8d683587e4e 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc
@@ -1,6 +1,6 @@
// === goToDefinition ===
// === /foo.js ===
-// [|module.exports = {};|]
+// [||]module.exports = {};
// === /bar.js ===
// var x = require(/*GOTO DEF*/[|"./foo"|]);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc.diff
deleted file mode 100644
index 3c044eec8c7..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.goToDefinitionJsModuleName.baseline.jsonc
-+++ new.goToDefinitionJsModuleName.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /foo.js ===
--// [||]module.exports = {};
-+// [|module.exports = {};|]
-
- // === /bar.js ===
- // var x = require(/*GOTO DEF*/[|"./foo"|]);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc
index 68d1f102705..b063f521100 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc
@@ -1,10 +1,10 @@
// === goToDefinition ===
// === /foo.js ===
-// [|function notExported() { }
-// class Blah {
-// abc = 123;
-// }
-// module.exports.Blah = Blah;|]
+// [|function notExported() { }
+// class Blah {
+// abc = 123;
+// }
+// module.exports.Blah = Blah;|]
// === /bar.js ===
// const /*GOTO DEF*/[|BlahModule|] = require("./foo.js");
@@ -14,11 +14,11 @@
// === goToDefinition ===
// === /foo.js ===
-// [|function notExported() { }
-// class Blah {
-// abc = 123;
-// }
-// module.exports.Blah = Blah;|]
+// [|function notExported() { }
+// class Blah {
+// abc = 123;
+// }
+// module.exports.Blah = Blah;|]
// === /bar.js ===
// const BlahModule = require("./foo.js");
@@ -28,11 +28,11 @@
// === goToDefinition ===
// === /foo.js ===
-// [|function notExported() { }
-// class Blah {
-// abc = 123;
-// }
-// module.exports.Blah = Blah;|]
+// [|function notExported() { }
+// class Blah {
+// abc = 123;
+// }
+// module.exports.Blah = Blah;|]
// === /barTs.ts ===
// import /*GOTO DEF*/[|BlahModule|] = require("./foo.js");
@@ -42,11 +42,11 @@
// === goToDefinition ===
// === /foo.js ===
-// [|function notExported() { }
-// class Blah {
-// abc = 123;
-// }
-// module.exports.Blah = Blah;|]
+// [|function notExported() { }
+// class Blah {
+// abc = 123;
+// }
+// module.exports.Blah = Blah;|]
// === /barTs.ts ===
// import BlahModule = require("./foo.js");
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc.diff
deleted file mode 100644
index ecbbbbea037..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc.diff
+++ /dev/null
@@ -1,69 +0,0 @@
---- old.goToDefinitionJsModuleNameAtImportName.baseline.jsonc
-+++ new.goToDefinitionJsModuleNameAtImportName.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /foo.js ===
--// [|function notExported() { }
--// class Blah {
--// abc = 123;
--// }
--// module.exports.Blah = Blah;|]
-+// [|function notExported() { }
-+// class Blah {
-+// abc = 123;
-+// }
-+// module.exports.Blah = Blah;|]
-
- // === /bar.js ===
- // const /*GOTO DEF*/[|BlahModule|] = require("./foo.js");
-@@= skipped -13, +13 lines =@@
-
- // === goToDefinition ===
- // === /foo.js ===
--// [|function notExported() { }
--// class Blah {
--// abc = 123;
--// }
--// module.exports.Blah = Blah;|]
-+// [|function notExported() { }
-+// class Blah {
-+// abc = 123;
-+// }
-+// module.exports.Blah = Blah;|]
-
- // === /bar.js ===
- // const BlahModule = require("./foo.js");
-@@= skipped -14, +14 lines =@@
-
- // === goToDefinition ===
- // === /foo.js ===
--// [|function notExported() { }
--// class Blah {
--// abc = 123;
--// }
--// module.exports.Blah = Blah;|]
-+// [|function notExported() { }
-+// class Blah {
-+// abc = 123;
-+// }
-+// module.exports.Blah = Blah;|]
-
- // === /barTs.ts ===
- // import /*GOTO DEF*/[|BlahModule|] = require("./foo.js");
-@@= skipped -14, +14 lines =@@
-
- // === goToDefinition ===
- // === /foo.js ===
--// [|function notExported() { }
--// class Blah {
--// abc = 123;
--// }
--// module.exports.Blah = Blah;|]
-+// [|function notExported() { }
-+// class Blah {
-+// abc = 123;
-+// }
-+// module.exports.Blah = Blah;|]
-
- // === /barTs.ts ===
- // import BlahModule = require("./foo.js");
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc
index c6c62dfd70a..d53ab109cc4 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc
@@ -1,11 +1,19 @@
// === goToDefinition ===
+// === /scriptThing.ts ===
+// [||]console.log("woooo side effects")
+
// === /moduleThing.ts ===
-// import /*GOTO DEF*/"./scriptThing";
+// import /*GOTO DEF*/[|"./scriptThing"|];
// import "./stylez.css";
// === goToDefinition ===
+// === /stylez.css ===
+// [||]div {
+// color: magenta;
+// }
+
// === /moduleThing.ts ===
// import "./scriptThing";
-// import /*GOTO DEF*/"./stylez.css";
\ No newline at end of file
+// import /*GOTO DEF*/[|"./stylez.css"|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc.diff
deleted file mode 100644
index 25cdf6bf166..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc.diff
+++ /dev/null
@@ -1,24 +0,0 @@
---- old.goToDefinitionScriptImport.baseline.jsonc
-+++ new.goToDefinitionScriptImport.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
--// === /scriptThing.ts ===
--// [||]console.log("woooo side effects")
--
- // === /moduleThing.ts ===
--// import /*GOTO DEF*/[|"./scriptThing"|];
-+// import /*GOTO DEF*/"./scriptThing";
- // import "./stylez.css";
-
-
-
- // === goToDefinition ===
--// === /stylez.css ===
--// [||]div {
--// color: magenta;
--// }
--
- // === /moduleThing.ts ===
- // import "./scriptThing";
--// import /*GOTO DEF*/[|"./stylez.css"|];
-+// import /*GOTO DEF*/"./stylez.css";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc
index 75f8f2bfe24..491b1ba8763 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc
@@ -1,15 +1,23 @@
// === goToDefinition ===
+// === /home/src/workspaces/project/scriptThing.ts ===
+// [||]console.log("woooo side effects")
+
// === /home/src/workspaces/project/moduleThing.ts ===
-// import /*GOTO DEF*/"./scriptThing";
+// import /*GOTO DEF*/[|"./scriptThing"|];
// import "./stylez.css";
// import "./foo.txt";
// === goToDefinition ===
+// === /home/src/workspaces/project/stylez.css ===
+// [||]div {
+// color: magenta;
+// }
+
// === /home/src/workspaces/project/moduleThing.ts ===
// import "./scriptThing";
-// import /*GOTO DEF*/"./stylez.css";
+// import /*GOTO DEF*/[|"./stylez.css"|];
// import "./foo.txt";
@@ -18,4 +26,4 @@
// === /home/src/workspaces/project/moduleThing.ts ===
// import "./scriptThing";
// import "./stylez.css";
-// import /*GOTO DEF*/"./foo.txt";
\ No newline at end of file
+// import /*GOTO DEF*/[|"./foo.txt"|];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc.diff
index 577cc4df34c..56cd5315f11 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc.diff
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc.diff
@@ -1,57 +1,14 @@
--- old.goToDefinitionScriptImportServer.baseline.jsonc
+++ new.goToDefinitionScriptImportServer.baseline.jsonc
-@@= skipped -0, +0 lines =@@
+@@= skipped -22, +22 lines =@@
+
+
// === goToDefinition ===
--// === /home/src/workspaces/project/scriptThing.ts ===
--// [||]console.log("woooo side effects")
--
--// === /home/src/workspaces/project/moduleThing.ts ===
--// import /*GOTO DEF*/[|"./scriptThing"|];
--// import "./stylez.css";
--// import "./foo.txt";
--
--
--
--// === goToDefinition ===
--// === /home/src/workspaces/project/stylez.css ===
--// [||]div {
--// color: magenta;
--// }
--
--// === /home/src/workspaces/project/moduleThing.ts ===
--// import "./scriptThing";
--// import /*GOTO DEF*/[|"./stylez.css"|];
--// import "./foo.txt";
--
--
--
--// === goToDefinition ===
-// === /home/src/workspaces/project/foo.txt ===
-// Unavailable file content:
-// textSpan: {"start":0,"length":0}
-
-
--// === /home/src/workspaces/project/moduleThing.ts ===
--// import "./scriptThing";
--// import "./stylez.css";
--// import /*GOTO DEF*/[|"./foo.txt"|];
-+// === /home/src/workspaces/project/moduleThing.ts ===
-+// import /*GOTO DEF*/"./scriptThing";
-+// import "./stylez.css";
-+// import "./foo.txt";
-+
-+
-+
-+// === goToDefinition ===
-+// === /home/src/workspaces/project/moduleThing.ts ===
-+// import "./scriptThing";
-+// import /*GOTO DEF*/"./stylez.css";
-+// import "./foo.txt";
-+
-+
-+
-+// === goToDefinition ===
-+// === /home/src/workspaces/project/moduleThing.ts ===
-+// import "./scriptThing";
-+// import "./stylez.css";
-+// import /*GOTO DEF*/"./foo.txt";
\ No newline at end of file
+ // === /home/src/workspaces/project/moduleThing.ts ===
+ // import "./scriptThing";
+ // import "./stylez.css";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc
index 8b2fd923922..8d6777ded6f 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc
@@ -3,8 +3,8 @@
// <|class [|c|] { }|>
// === /Consumption.ts ===
-// var n = new /*GOTO DEF*/[|c|]();
-// var n = new c();
+// var n = new /*GOTO DEF*/[|c|]();
+// var n = new c();
@@ -13,5 +13,5 @@
// <|class [|c|] { }|>
// === /Consumption.ts ===
-// var n = new c();
-// var n = new [|c|]/*GOTO DEF*/();
\ No newline at end of file
+// var n = new c();
+// var n = new [|c|]/*GOTO DEF*/();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc.diff
deleted file mode 100644
index 2ea7319dcc1..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc.diff
+++ /dev/null
@@ -1,21 +0,0 @@
---- old.goToDefinitionSimple.baseline.jsonc
-+++ new.goToDefinitionSimple.baseline.jsonc
-@@= skipped -2, +2 lines =@@
- // <|class [|c|] { }|>
-
- // === /Consumption.ts ===
--// var n = new /*GOTO DEF*/[|c|]();
--// var n = new c();
-+// var n = new /*GOTO DEF*/[|c|]();
-+// var n = new c();
-
-
-
-@@= skipped -10, +10 lines =@@
- // <|class [|c|] { }|>
-
- // === /Consumption.ts ===
--// var n = new c();
--// var n = new [|c|]/*GOTO DEF*/();
-+// var n = new c();
-+// var n = new [|c|]/*GOTO DEF*/();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc
index 012d454dcd4..a1e48898c0b 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc
@@ -1,22 +1,22 @@
// === goToDefinition ===
// === /a.ts ===
-// //MyFile Comments
-// //more comments
-// ///
-// ///
+// //MyFile Comments
+// //more comments
+// ///
+// ///
//
-// class clsInOverload {
+// class clsInOverload {
// --- (line: 7) skipped ---
// === goToDefinition ===
// === /a.ts ===
-// //MyFile Comments
-// //more comments
-// ///
-// ///
+// //MyFile Comments
+// //more comments
+// ///
+// ///
//
-// class clsInOverload {
-// static fnOverload();
+// class clsInOverload {
+// static fnOverload();
// --- (line: 8) skipped ---
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc.diff
index 7c4b0dd5883..3ef0fa9841c 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc.diff
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc.diff
@@ -1,21 +1,6 @@
--- old.goToDefinitionSourceUnit.baseline.jsonc
+++ new.goToDefinitionSourceUnit.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /a.ts ===
--// //MyFile Comments
--// //more comments
--// ///
--// ///
-+// //MyFile Comments
-+// //more comments
-+// ///
-+// ///
- //
--// class clsInOverload {
-+// class clsInOverload {
- // --- (line: 7) skipped ---
-
+@@= skipped -10, +10 lines =@@
// === goToDefinition ===
@@ -23,17 +8,11 @@
-// [||]
-
// === /a.ts ===
--// //MyFile Comments
--// //more comments
--// ///
+ // //MyFile Comments
+ // //more comments
+ // ///
-// ///
-+// //MyFile Comments
-+// //more comments
-+// ///
-+// ///
++// ///
//
--// class clsInOverload {
--// static fnOverload();
-+// class clsInOverload {
-+// static fnOverload();
- // --- (line: 8) skipped ---
\ No newline at end of file
+ // class clsInOverload {
+ // static fnOverload();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc
index 13d2189c7e1..445a53683f6 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc
@@ -1,9 +1,9 @@
// === goToDefinition ===
// === /goToDefinitionSwitchCase4.ts ===
-// switch (null) {
-// case null: break;
-// }
+// switch (null) {
+// case null: break;
+// }
//
-// [|switch|] (null) {
-// /*GOTO DEF*/case null: break;
-// }
\ No newline at end of file
+// [|switch|] (null) {
+// /*GOTO DEF*/case null: break;
+// }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc.diff
index f2d80693356..149e9b6bbc1 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc.diff
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc.diff
@@ -1,10 +1,18 @@
--- old.goToDefinitionSwitchCase4.baseline.jsonc
+++ new.goToDefinitionSwitchCase4.baseline.jsonc
-@@= skipped -3, +3 lines =@@
- // case null: break;
- // }
+@@= skipped -0, +0 lines =@@
+ // === goToDefinition ===
+ // === /goToDefinitionSwitchCase4.ts ===
+-// switch (null) {
+-// case null: break;
+-// }
++// switch (null) {
++// case null: break;
++// }
//
-// <|[|switch|] (null)|> {
-+// [|switch|] (null) {
- // /*GOTO DEF*/case null: break;
- // }
\ No newline at end of file
+-// /*GOTO DEF*/case null: break;
+-// }
++// [|switch|] (null) {
++// /*GOTO DEF*/case null: break;
++// }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc
index 92c108f58ac..7899d3b35f1 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc
@@ -1,4 +1,4 @@
// === goToDefinition ===
// === /src/app.ts ===
-// ///
-// $.x;
\ No newline at end of file
+// ///
+// $.x;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc.diff
index 9df7799d14c..f73a3d31db6 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc.diff
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc.diff
@@ -7,6 +7,5 @@
-
// === /src/app.ts ===
-// ///
--// $.x;
-+// ///
-+// $.x;
\ No newline at end of file
++// ///
+ // $.x;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc
index 12b487599ff..3bc376a6e69 100644
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc
+++ b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc
@@ -1,4 +1,4 @@
// === goToDefinition ===
// === /b.ts ===
-// <|import [|n|] = require('a');|>
-// var x = new /*GOTO DEF*/n.Foo();
\ No newline at end of file
+// <|import [|n|] = require('a');|>
+// var x = new /*GOTO DEF*/n.Foo();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc.diff
deleted file mode 100644
index 209678411f2..00000000000
--- a/testdata/baselines/reference/submodule/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.goToModuleAliasDefinition.baseline.jsonc
-+++ new.goToModuleAliasDefinition.baseline.jsonc
-@@= skipped -0, +0 lines =@@
- // === goToDefinition ===
- // === /b.ts ===
--// <|import [|n|] = require('a');|>
--// var x = new /*GOTO DEF*/n.Foo();
-+// <|import [|n|] = require('a');|>
-+// var x = new /*GOTO DEF*/n.Foo();
\ No newline at end of file