From 3c5ce8bc13bcd0d3243fec8ec95830ca3087c225 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 20:49:09 +0000 Subject: [PATCH 1/4] Initial plan From e1aa16cb30149b10d7c871aa2bb149365a0b4a52 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 20:58:55 +0000 Subject: [PATCH 2/4] Add fourslash test for code lens references including imports Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> --- .../codeLensReferencesIncludeImports_test.go | 30 +++++++++++++++++++ ...ensReferencesIncludeImports.baseline.jsonc | 4 +++ 2 files changed, 34 insertions(+) create mode 100644 internal/fourslash/tests/codeLensReferencesIncludeImports_test.go create mode 100644 testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc diff --git a/internal/fourslash/tests/codeLensReferencesIncludeImports_test.go b/internal/fourslash/tests/codeLensReferencesIncludeImports_test.go new file mode 100644 index 0000000000..7adae69d09 --- /dev/null +++ b/internal/fourslash/tests/codeLensReferencesIncludeImports_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls/lsutil" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCodeLensReferencesIncludeImports(t *testing.T) { + t.Parallel() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + + const content = ` +// @Filename: /abc.ts +export function abc() { } + +// @Filename: /other.ts +import { abc } from "./abc"; +` + f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content) + defer done() + f.VerifyBaselineCodeLens(t, &lsutil.UserPreferences{ + CodeLens: lsutil.CodeLensUserPreferences{ + ReferencesCodeLensEnabled: true, + ReferencesCodeLensShowOnAllFunctions: true, + }, + }) +} diff --git a/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc b/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc new file mode 100644 index 0000000000..1f3f1ea2bc --- /dev/null +++ b/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc @@ -0,0 +1,4 @@ +// === Code Lenses === +// === /abc.ts === +// export function /*CODELENS: 0 references*/abc() { } +// \ No newline at end of file From d1379237019e6aa79a62379bc6c4fae0e3042bbb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 21:38:54 +0000 Subject: [PATCH 3/4] Fix references code lens to include imports as references When finding references for an exported symbol, the import specifier (e.g., `abc` in `import { abc } from "./abc"`) should be counted as a reference to the export. This change: 1. Adds the import location as a reference to the export symbol in searchForImportsOfExport for non-aliased imports. 2. Skips duplicate addition of import specifiers when the search is coming from an export context, since they're already added by the explicit addRef call. Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> --- internal/ls/findallreferences.go | 14 ++++++++++++++ .../codeLensFunctionsAndConstants01.baseline.jsonc | 8 ++++---- .../codeLenses/codeLensInterface01.baseline.jsonc | 6 +++--- ...codeLensReferencesIncludeImports.baseline.jsonc | 6 +++++- ...documentHighlights_filesToSearch.baseline.jsonc | 2 +- ...ferencesNonExistentExportBinding.baseline.jsonc | 2 +- .../findAllReferencesOfConstructor.baseline.jsonc | 12 ++++++------ .../findAllRefsClassExpression2.baseline.jsonc | 4 ++-- .../findAllRefsExportAsNamespace.baseline.jsonc | 2 +- ...ndAllRefsExportConstEqualToClass.baseline.jsonc | 2 +- .../findAllRefsJsDocImportTag.baseline.jsonc | 2 +- .../findAllRefsJsDocImportTag3.baseline.jsonc | 2 +- ...lRefsOfConstructor_multipleFiles.baseline.jsonc | 2 +- .../findAllRefsOnImportAliases.baseline.jsonc | 4 ++-- ...indAllRefsPrefixSuffixPreference.baseline.jsonc | 4 ++-- .../findAllRefsReExportLocal.baseline.jsonc | 8 ++++---- ...RefsReExportRightNameWrongSymbol.baseline.jsonc | 6 +++--- .../findAllRefsReExportStar.baseline.jsonc | 2 +- .../findAllRefsReExportStarAs.baseline.jsonc | 4 ++-- ...dAllRefsReExportsUseInImportType.baseline.jsonc | 4 ++-- .../findReferencesJSXTagName.baseline.jsonc | 2 +- ...tOccurrencesIsDefinitionOfExport.baseline.jsonc | 2 +- .../isDefinitionSingleImport.baseline.jsonc | 2 +- .../referencesForStatementKeywords.baseline.jsonc | 4 ++-- ...renameImportAndExportInDiffFiles.baseline.jsonc | 4 ++-- .../renameImportOfExportEquals.baseline.jsonc | 2 +- .../renameImportOfReExport.baseline.jsonc | 2 +- .../transitiveExportImports2.baseline.jsonc | 2 +- .../transitiveExportImports3.baseline.jsonc | 4 ++-- .../state/codeLensAcrossProjects.baseline | 8 ++++---- ...efRedirectsAreDisabledDeclMapIsMissing.baseline | 2 +- ...RefRedirectsAreEnabledDeclMapIsMissing.baseline | 2 +- ...efRedirectsAreDisabledDeclMapIsMissing.baseline | 2 +- ...RefRedirectsAreEnabledDeclMapIsMissing.baseline | 2 +- ...utionReferencingDefaultProjectDirectly.baseline | 2 +- ...ionReferencingDefaultProjectIndirectly.baseline | 2 +- ...tlyThroughDisableReferencedProjectLoad.baseline | 6 +++--- ...dProjectLoadInOneButWithoutItInAnother.baseline | 2 +- ...tLoadReferencingDefaultProjectDirectly.baseline | 6 +++--- .../state/implementationsAcrossProjects.baseline | 6 +++--- .../goToImplementationInterface_09.baseline.jsonc | 2 +- ...oImplementationInterface_09.baseline.jsonc.diff | 3 ++- .../goToImplementationTypeAlias_00.baseline.jsonc | 2 +- ...oImplementationTypeAlias_00.baseline.jsonc.diff | 3 ++- ...oImplementation_inDifferentFiles.baseline.jsonc | 2 +- ...ementation_inDifferentFiles.baseline.jsonc.diff | 10 ++++++++++ 46 files changed, 106 insertions(+), 76 deletions(-) create mode 100644 testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc.diff diff --git a/internal/ls/findallreferences.go b/internal/ls/findallreferences.go index 5744271afa..0f81a4cc53 100644 --- a/internal/ls/findallreferences.go +++ b/internal/ls/findallreferences.go @@ -1910,6 +1910,12 @@ func (state *refState) getReferencesAtLocation(sourceFile *ast.SourceFile, posit return } + // For non-aliased imports like `import { foo }`, skip when coming from an export search, + // as these are already added in searchForImportsOfExport. + if parent.Kind == ast.KindImportSpecifier && parent.PropertyName() == nil && parent.Name() == referenceLocation && search.comingFrom == ImpExpKindExport { + return + } + if parent.Kind == ast.KindExportSpecifier { state.getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent.AsExportSpecifier(), search, addReferencesHere, false /*alwaysGetReferences*/) return @@ -2133,6 +2139,14 @@ func (state *refState) searchForImportsOfExport(exportLocation *ast.Node, export // For each import, find all references to that import in its source file. for _, i := range r.importSearches { + // For `import { abc }` (no alias), add the import as a reference to the export symbol. + // For `import { foo as bar }`, `foo` is already added via singleReferences above, + // and `bar` is just a local alias, not a reference to the export. + if ast.IsImportSpecifier(i.importLocation.Parent) && i.importLocation.Parent.PropertyName() == nil { + addRef := state.referenceAdder(exportSymbol) + addRef(i.importLocation, entryKindNode) + } + // Then search for uses of the imported symbol in the file state.getReferencesInSourceFile(ast.GetSourceFileOfNode(i.importLocation), state.createSearch(i.importLocation, i.importSymbol, ImpExpKindExport, "", nil), true /*addReferencesHere*/) } diff --git a/testdata/baselines/reference/fourslash/codeLenses/codeLensFunctionsAndConstants01.baseline.jsonc b/testdata/baselines/reference/fourslash/codeLenses/codeLensFunctionsAndConstants01.baseline.jsonc index 5c306865e3..3f357e9fbc 100644 --- a/testdata/baselines/reference/fourslash/codeLenses/codeLensFunctionsAndConstants01.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/codeLenses/codeLensFunctionsAndConstants01.baseline.jsonc @@ -1,7 +1,7 @@ // === Code Lenses === // === /exports.ts === // let callCount = 0; -// export function /*CODELENS: 3 references*/foo(n: number): void { +// export function /*CODELENS: 4 references*/foo(n: number): void { // callCount++; // if (n > 0) { // [|foo|](n - 1); @@ -17,7 +17,7 @@ // // === /importer.ts === -// import { foo, bar } from "./exports"; +// import { [|foo|], bar } from "./exports"; // // [|foo|](5); // console.log(bar); @@ -27,7 +27,7 @@ // === Code Lenses === // === /importer.ts === -// import { foo, bar } from "./exports"; +// import { foo, [|bar|] } from "./exports"; // // foo(5); // console.log([|bar|]); @@ -38,5 +38,5 @@ // // foo(5); // -// export const /*CODELENS: 1 reference*/bar = 123; +// export const /*CODELENS: 2 references*/bar = 123; // \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/codeLenses/codeLensInterface01.baseline.jsonc b/testdata/baselines/reference/fourslash/codeLenses/codeLensInterface01.baseline.jsonc index dc284d737a..92a5e12c5b 100644 --- a/testdata/baselines/reference/fourslash/codeLenses/codeLensInterface01.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/codeLenses/codeLensInterface01.baseline.jsonc @@ -89,7 +89,7 @@ // === Code Lenses === // === /classPointable.ts === -// import { Pointable } from "./pointable"; +// import { [|Pointable|] } from "./pointable"; // // class Point implements [|Pointable|] { // getX(): number { @@ -98,7 +98,7 @@ // --- (line: 7) skipped --- // === /objectPointable.ts === -// import { Pointable } from "./pointable"; +// import { [|Pointable|] } from "./pointable"; // // let x = 0; // let y = 0; @@ -109,7 +109,7 @@ // --- (line: 9) skipped --- // === /pointable.ts === -// export interface /*CODELENS: 2 references*/Pointable { +// export interface /*CODELENS: 4 references*/Pointable { // getX(): number; // getY(): number; // } diff --git a/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc b/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc index 1f3f1ea2bc..1cb73c1e3f 100644 --- a/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc @@ -1,4 +1,8 @@ // === Code Lenses === +// === /other.ts === +// import { [|abc|] } from "./abc"; +// + // === /abc.ts === -// export function /*CODELENS: 0 references*/abc() { } +// export function /*CODELENS: 1 reference*/abc() { } // \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/documentHighlights/documentHighlights_filesToSearch.baseline.jsonc b/testdata/baselines/reference/fourslash/documentHighlights/documentHighlights_filesToSearch.baseline.jsonc index e8e985a42a..f5a2db2a5b 100644 --- a/testdata/baselines/reference/fourslash/documentHighlights/documentHighlights_filesToSearch.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/documentHighlights/documentHighlights_filesToSearch.baseline.jsonc @@ -6,4 +6,4 @@ // === documentHighlights === // === /b.ts === -// import { /*HIGHLIGHTS*/[|x|] } from "./a"; \ No newline at end of file +// import { /*HIGHLIGHTS*/[|[|x|]|] } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc index d6652ae187..27d6de3dd5 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc @@ -1,6 +1,6 @@ // === findAllReferences === // === /bar.ts === -// import { [|Foo|]/*FIND ALL REFS*/ } from "./foo"; +// import { [|[|Foo|]|]/*FIND ALL REFS*/ } from "./foo"; // === /foo.ts === // export { [|Foo|] } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc index 4e2671027f..1e8ae0b7f4 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc @@ -14,11 +14,11 @@ // new D(); // === /b.ts === -// import { C } from "./a"; +// import { [|C|] } from "./a"; // new [|C|](); // === /c.ts === -// import { C } from "./a"; +// import { [|C|] } from "./a"; // class D extends C { // constructor() { // [|super|](); @@ -50,11 +50,11 @@ // new D(); // === /b.ts === -// import { C } from "./a"; +// import { [|C|] } from "./a"; // new [|C|](); // === /c.ts === -// import { C } from "./a"; +// import { [|C|] } from "./a"; // class D extends C { // constructor() { // [|super|](); @@ -86,11 +86,11 @@ // new D(); // === /b.ts === -// import { C } from "./a"; +// import { [|C|] } from "./a"; // new [|C|](); // === /c.ts === -// import { C } from "./a"; +// import { [|C|] } from "./a"; // class D extends C { // constructor() { // [|super|](); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc index f5cf4ae9a5..fd541b971a 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc @@ -13,7 +13,7 @@ // exports.[|A|] = class {}; // === /b.js === -// import { /*FIND ALL REFS*/[|A|] } from "./a"; +// import { /*FIND ALL REFS*/[|[|A|]|] } from "./a"; // [|A|]; @@ -23,5 +23,5 @@ // exports.[|A|] = class {}; // === /b.js === -// import { [|A|] } from "./a"; +// import { [|[|A|]|] } from "./a"; // /*FIND ALL REFS*/[|A|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportAsNamespace.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportAsNamespace.baseline.jsonc index af8207ceac..847f32a552 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportAsNamespace.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportAsNamespace.baseline.jsonc @@ -13,7 +13,7 @@ // === findAllReferences === // === /b.ts === -// import { /*FIND ALL REFS*/[|f|] } from "a"; +// import { /*FIND ALL REFS*/[|[|f|]|] } from "a"; // === /c.ts === // A.[|f|](); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc index e745202e15..8f029c69a0 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc @@ -14,4 +14,4 @@ // export const [|D|] = C; // === /b.ts === -// import { /*FIND ALL REFS*/[|D|] } from "./a"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|[|D|]|] } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc index 8d4374f0f1..c5fbf33222 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc @@ -1,7 +1,7 @@ // === findAllReferences === // === /a.js === // /** -// * @import { [|A|] } from "./b"; +// * @import { [|[|A|]|] } from "./b"; // */ // // /** diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc index 0059cc284c..00a66f1efc 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc @@ -7,7 +7,7 @@ // --- (line: 5) skipped --- // === /player.js === -// import { [|Component|] } from './component.js'; +// import { [|[|Component|]|] } from './component.js'; // // /** // * @extends [|Component|]/*FIND ALL REFS*/ diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_multipleFiles.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_multipleFiles.baseline.jsonc index 8d1f4f8ead..81cb8c3451 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_multipleFiles.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_multipleFiles.baseline.jsonc @@ -6,7 +6,7 @@ // export { [|B|] as [|B1|] } from "./f"; // === /b.ts === -// import B, { B1 } from "./a"; +// import B, { [|B1|] } from "./a"; // const d = new [|B|]("b"); // const d1 = new [|B1|]("b1"); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc index 7d231f7fa6..f267740bca 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc @@ -19,7 +19,7 @@ // } // === /b.ts === -// import { /*FIND ALL REFS*/[|Class|] } from "./a"; +// import { /*FIND ALL REFS*/[|[|Class|]|] } from "./a"; // // var c = new [|Class|](); @@ -34,7 +34,7 @@ // } // === /b.ts === -// import { [|Class|] } from "./a"; +// import { [|[|Class|]|] } from "./a"; // // var c = new /*FIND ALL REFS*/[|Class|](); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrefixSuffixPreference.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrefixSuffixPreference.baseline.jsonc index 4909dd61cc..179316f533 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrefixSuffixPreference.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrefixSuffixPreference.baseline.jsonc @@ -47,7 +47,7 @@ // === /file2.ts === // declare function log(s: string | number): void; -// import { /*FIND ALL REFS*/[|q|] } from "./file1"; +// import { /*FIND ALL REFS*/[|[|q|]|] } from "./file1"; // log([|q|] + 1); @@ -65,7 +65,7 @@ // === /file2.ts === // declare function log(s: string | number): void; -// import { [|q|] } from "./file1"; +// import { [|[|q|]|] } from "./file1"; // log(/*FIND ALL REFS*/[|q|] + 1); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportLocal.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportLocal.baseline.jsonc index 147c24f1ef..3ac954753b 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportLocal.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportLocal.baseline.jsonc @@ -41,7 +41,7 @@ // export { [|x|] as [|y|] }; // === /b.ts === -// import { /*FIND ALL REFS*/[|x|], [|y|] } from "./a"; +// import { /*FIND ALL REFS*/[|[|x|]|], [|y|] } from "./a"; // [|x|]; [|y|]; @@ -53,7 +53,7 @@ // export { [|x|] as [|y|] }; // === /b.ts === -// import { [|x|], [|y|] } from "./a"; +// import { [|[|x|]|], [|y|] } from "./a"; // /*FIND ALL REFS*/[|x|]; [|y|]; @@ -77,7 +77,7 @@ // export { x as [|y|] }; // === /b.ts === -// import { x, /*FIND ALL REFS*/[|y|] } from "./a"; +// import { x, /*FIND ALL REFS*/[|[|y|]|] } from "./a"; // x; [|y|]; @@ -89,5 +89,5 @@ // export { x as [|y|] }; // === /b.ts === -// import { x, [|y|] } from "./a"; +// import { x, [|[|y|]|] } from "./a"; // x; /*FIND ALL REFS*/[|y|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc index 690a325204..f624b63c25 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc @@ -43,7 +43,7 @@ // === /c.ts === // export { x } from "./b"; -// import { /*FIND ALL REFS*/[|x|] } from "./a"; +// import { /*FIND ALL REFS*/[|[|x|]|] } from "./a"; // [|x|]; @@ -54,7 +54,7 @@ // === /c.ts === // export { x } from "./b"; -// import { [|x|] } from "./a"; +// import { [|[|x|]|] } from "./a"; // /*FIND ALL REFS*/[|x|]; @@ -69,4 +69,4 @@ // x; // === /d.ts === -// import { /*FIND ALL REFS*/[|x|] } from "./c"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|[|x|]|] } from "./c"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStar.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStar.baseline.jsonc index 37e4edbc06..7ef69da981 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStar.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStar.baseline.jsonc @@ -12,4 +12,4 @@ // export function [|foo|](): void {} // === /c.ts === -// import { /*FIND ALL REFS*/[|foo|] } from "./b"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|[|foo|]|] } from "./b"; \ 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 22a217bed3..b2161f6cde 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStarAs.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStarAs.baseline.jsonc @@ -33,7 +33,7 @@ // export * as [|Leaf|] from './leafModule'; // === /importing.ts === -// import { /*FIND ALL REFS*/[|Leaf|] } from './exporting'; +// import { /*FIND ALL REFS*/[|[|Leaf|]|] } from './exporting'; // [|Leaf|].hello() @@ -43,5 +43,5 @@ // export * as [|Leaf|] from './leafModule'; // === /importing.ts === -// import { [|Leaf|] } from './exporting'; +// import { [|[|Leaf|]|] } from './exporting'; // /*FIND ALL REFS*/[|Leaf|].hello() \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportsUseInImportType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportsUseInImportType.baseline.jsonc index a647cd1eb7..8e0545b17e 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportsUseInImportType.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportsUseInImportType.baseline.jsonc @@ -62,7 +62,7 @@ // === findAllReferences === // === /app.ts === -// import { /*FIND ALL REFS*/[|foo|] } from './foo/types'; +// import { /*FIND ALL REFS*/[|[|foo|]|] } from './foo/types'; // export type fullType = [|foo|].Full; // type namespaceImport = typeof import('./foo/types'); // type fullType2 = import('./foo/types').[|foo|].Full; @@ -75,7 +75,7 @@ // === findAllReferences === // === /app.ts === -// import { [|foo|] } from './foo/types'; +// import { [|[|foo|]|] } from './foo/types'; // export type fullType = /*FIND ALL REFS*/[|foo|].Full; // type namespaceImport = typeof import('./foo/types'); // type fullType2 = import('./foo/types').[|foo|].Full; diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc index b0d90630ef..5fe0096fe4 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc @@ -4,7 +4,7 @@ //
; // === /index.tsx === -// import { /*FIND ALL REFS*/[|SubmissionComp|] } from "./RedditSubmission" +// import { /*FIND ALL REFS*/[|[|SubmissionComp|]|] } from "./RedditSubmission" // function displaySubreddit(subreddit: string) { // let components = submissions // .map((value, index) => <[|SubmissionComp|] key={ index } elementPosition= { index } {...value.data} />); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc index 75f7ea71d1..7687de5b21 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc @@ -13,5 +13,5 @@ // export var [|x|] = 12; // === /main.ts === -// import { /*FIND ALL REFS*/[|x|] } from "./m"; +// import { /*FIND ALL REFS*/[|[|x|]|] } from "./m"; // const y = [|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc index 52a7e63c1b..43396aebb7 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc @@ -12,4 +12,4 @@ // export function [|f|]() {} // === /b.ts === -// import { /*FIND ALL REFS*/[|f|] } from "./a"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|[|f|]|] } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatementKeywords.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatementKeywords.baseline.jsonc index 568a75dd72..2de5e88d8e 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatementKeywords.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatementKeywords.baseline.jsonc @@ -146,7 +146,7 @@ // // import ... from ... // import type B from "./b"; // import type * as C from "./c"; -// /*FIND ALL REFS*/import type { [|D|] } from "./d"; +// /*FIND ALL REFS*/import type { [|[|D|]|] } from "./d"; // import type { e1, e2 as e3 } from "./e"; // // // import "module" @@ -163,7 +163,7 @@ // // import ... from ... // import type B from "./b"; // import type * as C from "./c"; -// import /*FIND ALL REFS*/type { [|D|] } from "./d"; +// import /*FIND ALL REFS*/type { [|[|D|]|] } from "./d"; // import type { e1, e2 as e3 } from "./e"; // // // import "module" diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc index 985ec38318..8375b0d0b0 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc @@ -13,7 +13,7 @@ // export var [|a|]; // === /b.ts === -// import { /*FIND ALL REFS*/[|a|] } from './a'; +// import { /*FIND ALL REFS*/[|[|a|]|] } from './a'; // export { [|a|] }; @@ -23,5 +23,5 @@ // export var [|a|]; // === /b.ts === -// import { [|a|] } from './a'; +// import { [|[|a|]|] } from './a'; // export { /*FIND ALL REFS*/[|a|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc index febf7f8048..3363305ee8 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc @@ -49,7 +49,7 @@ // export { [|N|] }; // Renaming N here would rename // } // declare module "b" { -// import { /*FIND ALL REFS*/[|N|] } from "a"; +// import { /*FIND ALL REFS*/[|[|N|]|] } from "a"; // export const y: typeof [|N|].x; // } diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfReExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfReExport.baseline.jsonc index 001ff3c4f1..510da8ddb2 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfReExport.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfReExport.baseline.jsonc @@ -37,6 +37,6 @@ // export { [|C|] } from "a"; // } // declare module "c" { -// import { /*FIND ALL REFS*/[|C|] } from "b"; +// import { /*FIND ALL REFS*/[|[|C|]|] } from "b"; // export function f(c: [|C|]): void; // } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports2.baseline.jsonc index e1028fead3..960cabf79a 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports2.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports2.baseline.jsonc @@ -29,4 +29,4 @@ // [|B|].x; // === /c.ts === -// import { /*FIND ALL REFS*/[|B|] } from "./b"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|[|B|]|] } from "./b"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports3.baseline.jsonc index 0f9249e992..3954d09f81 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports3.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports3.baseline.jsonc @@ -21,7 +21,7 @@ // === /b.ts === // export { f as [|g|] } from "./a"; // import { f } from "./a"; -// import { /*FIND ALL REFS*/[|g|] } from "./b"; +// import { /*FIND ALL REFS*/[|[|g|]|] } from "./b"; @@ -31,5 +31,5 @@ // === /b.ts === // export { [|f|] as [|g|] } from "./a"; -// import { /*FIND ALL REFS*/[|f|] } from "./a"; +// import { /*FIND ALL REFS*/[|[|f|]|] } from "./a"; // import { [|g|] } from "./b"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline b/testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline index 6425dbacf4..f46c0c1111 100644 --- a/testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline +++ b/testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline @@ -296,7 +296,7 @@ Config:: // === Code Lenses === // === /projects/container/compositeExec/index.ts === -// import { Pointable } from "../lib"; +// import { [|Pointable|] } from "../lib"; // class Point2 implements [|Pointable|] { // getX(): number { // return 0; @@ -304,7 +304,7 @@ Config:: // --- (line: 6) skipped --- // === /projects/container/exec/index.ts === -// import { Pointable } from "../lib"; +// import { [|Pointable|] } from "../lib"; // class Point1 implements [|Pointable|] { // getX(): number { // return 0; @@ -312,7 +312,7 @@ Config:: // --- (line: 6) skipped --- // === /projects/container/lib/bar.ts === -// import { Pointable } from "./index"; +// import { [|Pointable|] } from "./index"; // class Point implements [|Pointable|] { // getX(): number { // return 0; @@ -321,7 +321,7 @@ Config:: // === /projects/container/lib/index.ts === // -// export interface /*CODELENS: 3 references*/Pointable { +// export interface /*CODELENS: 6 references*/Pointable { // getX(): number; // getY(): number; // } diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline index fbf99a5940..3cb1963b6c 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline @@ -78,7 +78,7 @@ Config File Names:: // === findAllReferences === // === /myproject/a/index.ts === -// import { [|B|] } from "../b/lib"; +// import { [|[|B|]|] } from "../b/lib"; // const b: /*FIND ALL REFS*/[|B|] = new [|B|](); // === /myproject/b/lib/index.d.ts === diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline index 04c077884c..d0589635cb 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline @@ -78,7 +78,7 @@ Config File Names:: // === findAllReferences === // === /myproject/a/index.ts === -// import { [|B|] } from "../b/lib"; +// import { [|[|B|]|] } from "../b/lib"; // const b: /*FIND ALL REFS*/[|B|] = new [|B|](); // === /myproject/b/lib/index.d.ts === diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline index 10f5deff34..3a5acd0d41 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline @@ -78,7 +78,7 @@ Config File Names:: // === findAllReferences === // === /myproject/a/index.ts === -// import { [|B|] } from "../b/lib"; +// import { [|[|B|]|] } from "../b/lib"; // const b: /*FIND ALL REFS*/[|B|] = new [|B|](); // === /myproject/b/lib/index.d.ts === diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline index 634f5d5ab0..15f8bc1739 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline @@ -78,7 +78,7 @@ Config File Names:: // === findAllReferences === // === /myproject/a/index.ts === -// import { [|B|] } from "../b/lib"; +// import { [|[|B|]|] } from "../b/lib"; // const b: /*FIND ALL REFS*/[|B|] = new [|B|](); // === /myproject/b/lib/index.d.ts === diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline index 0c4e7f0b4c..3c0932a0b2 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline @@ -344,7 +344,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|foo|] } from './helpers/functions'; +// import { [|[|foo|]|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline index 6b9f877b4e..47b0e34794 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline @@ -517,7 +517,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|foo|] } from './helpers/functions'; +// import { [|[|foo|]|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline index 7e4db060dc..b5848de190 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline @@ -503,7 +503,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|foo|] } from './helpers/functions'; +// import { [|[|foo|]|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", @@ -585,7 +585,7 @@ Config:: // === findAllReferences === // === /myproject/indirect3/main.ts === -// import { /*FIND ALL REFS*/[|foo|] } from '../target/src/main'; +// import { /*FIND ALL REFS*/[|[|foo|]|] } from '../target/src/main'; // [|foo|]() // export function bar() {} @@ -593,5 +593,5 @@ Config:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|foo|] } from './helpers/functions'; +// import { [|[|foo|]|] } from './helpers/functions'; // export { [|foo|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline index 1a77760def..43010d8bb0 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline @@ -518,7 +518,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|foo|] } from './helpers/functions'; +// import { [|[|foo|]|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline index 6cea2295d9..5a4b40013f 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline @@ -331,7 +331,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|foo|] } from './helpers/functions'; +// import { [|[|foo|]|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", @@ -409,7 +409,7 @@ Config:: // === findAllReferences === // === /myproject/indirect3/main.ts === -// import { /*FIND ALL REFS*/[|foo|] } from '../target/src/main'; +// import { /*FIND ALL REFS*/[|[|foo|]|] } from '../target/src/main'; // [|foo|]() // export function bar() {} // @@ -418,5 +418,5 @@ Config:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|foo|] } from './helpers/functions'; +// import { [|[|foo|]|] } from './helpers/functions'; // export { [|foo|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/state/implementationsAcrossProjects.baseline b/testdata/baselines/reference/fourslash/state/implementationsAcrossProjects.baseline index b073b575f1..9318e6345a 100644 --- a/testdata/baselines/reference/fourslash/state/implementationsAcrossProjects.baseline +++ b/testdata/baselines/reference/fourslash/state/implementationsAcrossProjects.baseline @@ -213,7 +213,7 @@ Config:: // === goToImplementation === // === /projects/container/compositeExec/index.ts === -// import { Foo } from "../lib"; +// <|import { [|Foo|] } from "../lib";|> // <|class [|A2|] implements Foo { // func() {} // }|> @@ -222,7 +222,7 @@ Config:: // }|> // === /projects/container/exec/index.ts === -// import { Foo } from "../lib"; +// <|import { [|Foo|] } from "../lib";|> // <|class [|A1|] implements Foo { // func() {} // }|> @@ -231,7 +231,7 @@ Config:: // }|> // === /projects/container/lib/bar.ts === -// import {Foo} from './index' +// <|import {[|Foo|]} from './index'|> // <|class [|A|] implements Foo { // func() {} // }|> diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc index 86b3ad92be..ea048b383b 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc @@ -1,4 +1,4 @@ // === goToImplementation === // === /ref.ts === -// import { Interface } from "./def"; +// <|import { [|Interface|] } from "./def";|> // const c: I/*GOTO IMPL*/nterface = { P: 2 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc.diff index e7dd7931be..9e79603339 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc.diff +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc.diff @@ -3,6 +3,7 @@ @@= skipped -0, +0 lines =@@ // === goToImplementation === // === /ref.ts === - // import { Interface } from "./def"; +-// import { Interface } from "./def"; -// const c: I/*GOTO IMPL*/nterface = [|{ P: 2 }|]; ++// <|import { [|Interface|] } from "./def";|> +// const c: I/*GOTO IMPL*/nterface = { P: 2 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc index 2cf8e91944..b94f0cd2eb 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc @@ -1,4 +1,4 @@ // === goToImplementation === // === /ref.ts === -// import { TypeAlias } from "./def"; +// <|import { [|TypeAlias|] } from "./def";|> // const c: T/*GOTO IMPL*/ypeAlias = { P: 2 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc.diff index 4f15fa96cc..914f136ab1 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc.diff +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc.diff @@ -3,6 +3,7 @@ @@= skipped -0, +0 lines =@@ // === goToImplementation === // === /ref.ts === - // import { TypeAlias } from "./def"; +-// import { TypeAlias } from "./def"; -// const c: T/*GOTO IMPL*/ypeAlias = [|{ P: 2 }|]; ++// <|import { [|TypeAlias|] } from "./def";|> +// const c: T/*GOTO IMPL*/ypeAlias = { P: 2 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc index b2e3f3e351..c246733c5e 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc @@ -1,6 +1,6 @@ // === goToImplementation === // === /home/src/workspaces/project/bar.ts === -// import {Foo} from './foo' +// import {[|Foo|]} from './foo' // // class [|A|] implements Foo { // func() {} diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc.diff new file mode 100644 index 0000000000..26650dacb8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc.diff @@ -0,0 +1,10 @@ +--- old.goToImplementation_inDifferentFiles.baseline.jsonc ++++ new.goToImplementation_inDifferentFiles.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === goToImplementation === + // === /home/src/workspaces/project/bar.ts === +-// import {Foo} from './foo' ++// import {[|Foo|]} from './foo' + // + // class [|A|] implements Foo { + // func() {} \ No newline at end of file From aaefcb7ac97ca719885cfea087fd8d2df3ecae98 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 22:25:02 +0000 Subject: [PATCH 4/4] Revert incorrect fix that caused doubled ranges and regressions The previous fix was adding imports to singleReferences and adding skip logic in getReferencesAtLocation, but this approach was not based on the original TypeScript implementation and caused: - Doubled reference ranges like [|[|B|]|] - Regressions in goToImplementation tests This reverts to the original behavior while keeping the fourslash test that demonstrates the issue (showing 0 references for now). Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> --- internal/ls/findallreferences.go | 14 -------------- .../codeLensFunctionsAndConstants01.baseline.jsonc | 8 ++++---- .../codeLenses/codeLensInterface01.baseline.jsonc | 6 +++--- ...codeLensReferencesIncludeImports.baseline.jsonc | 6 +----- ...documentHighlights_filesToSearch.baseline.jsonc | 2 +- ...ferencesNonExistentExportBinding.baseline.jsonc | 2 +- .../findAllReferencesOfConstructor.baseline.jsonc | 12 ++++++------ .../findAllRefsClassExpression2.baseline.jsonc | 4 ++-- .../findAllRefsExportAsNamespace.baseline.jsonc | 2 +- ...ndAllRefsExportConstEqualToClass.baseline.jsonc | 2 +- .../findAllRefsJsDocImportTag.baseline.jsonc | 2 +- .../findAllRefsJsDocImportTag3.baseline.jsonc | 2 +- ...lRefsOfConstructor_multipleFiles.baseline.jsonc | 2 +- .../findAllRefsOnImportAliases.baseline.jsonc | 4 ++-- ...indAllRefsPrefixSuffixPreference.baseline.jsonc | 4 ++-- .../findAllRefsReExportLocal.baseline.jsonc | 8 ++++---- ...RefsReExportRightNameWrongSymbol.baseline.jsonc | 6 +++--- .../findAllRefsReExportStar.baseline.jsonc | 2 +- .../findAllRefsReExportStarAs.baseline.jsonc | 4 ++-- ...dAllRefsReExportsUseInImportType.baseline.jsonc | 4 ++-- .../findReferencesJSXTagName.baseline.jsonc | 2 +- ...tOccurrencesIsDefinitionOfExport.baseline.jsonc | 2 +- .../isDefinitionSingleImport.baseline.jsonc | 2 +- .../referencesForStatementKeywords.baseline.jsonc | 4 ++-- ...renameImportAndExportInDiffFiles.baseline.jsonc | 4 ++-- .../renameImportOfExportEquals.baseline.jsonc | 2 +- .../renameImportOfReExport.baseline.jsonc | 2 +- .../transitiveExportImports2.baseline.jsonc | 2 +- .../transitiveExportImports3.baseline.jsonc | 4 ++-- .../state/codeLensAcrossProjects.baseline | 8 ++++---- ...efRedirectsAreDisabledDeclMapIsMissing.baseline | 2 +- ...RefRedirectsAreEnabledDeclMapIsMissing.baseline | 2 +- ...efRedirectsAreDisabledDeclMapIsMissing.baseline | 2 +- ...RefRedirectsAreEnabledDeclMapIsMissing.baseline | 2 +- ...utionReferencingDefaultProjectDirectly.baseline | 2 +- ...ionReferencingDefaultProjectIndirectly.baseline | 2 +- ...tlyThroughDisableReferencedProjectLoad.baseline | 6 +++--- ...dProjectLoadInOneButWithoutItInAnother.baseline | 2 +- ...tLoadReferencingDefaultProjectDirectly.baseline | 6 +++--- .../state/implementationsAcrossProjects.baseline | 6 +++--- .../goToImplementationInterface_09.baseline.jsonc | 2 +- ...oImplementationInterface_09.baseline.jsonc.diff | 3 +-- .../goToImplementationTypeAlias_00.baseline.jsonc | 2 +- ...oImplementationTypeAlias_00.baseline.jsonc.diff | 3 +-- ...oImplementation_inDifferentFiles.baseline.jsonc | 2 +- ...ementation_inDifferentFiles.baseline.jsonc.diff | 10 ---------- 46 files changed, 76 insertions(+), 106 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc.diff diff --git a/internal/ls/findallreferences.go b/internal/ls/findallreferences.go index 0f81a4cc53..5744271afa 100644 --- a/internal/ls/findallreferences.go +++ b/internal/ls/findallreferences.go @@ -1910,12 +1910,6 @@ func (state *refState) getReferencesAtLocation(sourceFile *ast.SourceFile, posit return } - // For non-aliased imports like `import { foo }`, skip when coming from an export search, - // as these are already added in searchForImportsOfExport. - if parent.Kind == ast.KindImportSpecifier && parent.PropertyName() == nil && parent.Name() == referenceLocation && search.comingFrom == ImpExpKindExport { - return - } - if parent.Kind == ast.KindExportSpecifier { state.getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent.AsExportSpecifier(), search, addReferencesHere, false /*alwaysGetReferences*/) return @@ -2139,14 +2133,6 @@ func (state *refState) searchForImportsOfExport(exportLocation *ast.Node, export // For each import, find all references to that import in its source file. for _, i := range r.importSearches { - // For `import { abc }` (no alias), add the import as a reference to the export symbol. - // For `import { foo as bar }`, `foo` is already added via singleReferences above, - // and `bar` is just a local alias, not a reference to the export. - if ast.IsImportSpecifier(i.importLocation.Parent) && i.importLocation.Parent.PropertyName() == nil { - addRef := state.referenceAdder(exportSymbol) - addRef(i.importLocation, entryKindNode) - } - // Then search for uses of the imported symbol in the file state.getReferencesInSourceFile(ast.GetSourceFileOfNode(i.importLocation), state.createSearch(i.importLocation, i.importSymbol, ImpExpKindExport, "", nil), true /*addReferencesHere*/) } diff --git a/testdata/baselines/reference/fourslash/codeLenses/codeLensFunctionsAndConstants01.baseline.jsonc b/testdata/baselines/reference/fourslash/codeLenses/codeLensFunctionsAndConstants01.baseline.jsonc index 3f357e9fbc..5c306865e3 100644 --- a/testdata/baselines/reference/fourslash/codeLenses/codeLensFunctionsAndConstants01.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/codeLenses/codeLensFunctionsAndConstants01.baseline.jsonc @@ -1,7 +1,7 @@ // === Code Lenses === // === /exports.ts === // let callCount = 0; -// export function /*CODELENS: 4 references*/foo(n: number): void { +// export function /*CODELENS: 3 references*/foo(n: number): void { // callCount++; // if (n > 0) { // [|foo|](n - 1); @@ -17,7 +17,7 @@ // // === /importer.ts === -// import { [|foo|], bar } from "./exports"; +// import { foo, bar } from "./exports"; // // [|foo|](5); // console.log(bar); @@ -27,7 +27,7 @@ // === Code Lenses === // === /importer.ts === -// import { foo, [|bar|] } from "./exports"; +// import { foo, bar } from "./exports"; // // foo(5); // console.log([|bar|]); @@ -38,5 +38,5 @@ // // foo(5); // -// export const /*CODELENS: 2 references*/bar = 123; +// export const /*CODELENS: 1 reference*/bar = 123; // \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/codeLenses/codeLensInterface01.baseline.jsonc b/testdata/baselines/reference/fourslash/codeLenses/codeLensInterface01.baseline.jsonc index 92a5e12c5b..dc284d737a 100644 --- a/testdata/baselines/reference/fourslash/codeLenses/codeLensInterface01.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/codeLenses/codeLensInterface01.baseline.jsonc @@ -89,7 +89,7 @@ // === Code Lenses === // === /classPointable.ts === -// import { [|Pointable|] } from "./pointable"; +// import { Pointable } from "./pointable"; // // class Point implements [|Pointable|] { // getX(): number { @@ -98,7 +98,7 @@ // --- (line: 7) skipped --- // === /objectPointable.ts === -// import { [|Pointable|] } from "./pointable"; +// import { Pointable } from "./pointable"; // // let x = 0; // let y = 0; @@ -109,7 +109,7 @@ // --- (line: 9) skipped --- // === /pointable.ts === -// export interface /*CODELENS: 4 references*/Pointable { +// export interface /*CODELENS: 2 references*/Pointable { // getX(): number; // getY(): number; // } diff --git a/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc b/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc index 1cb73c1e3f..1f3f1ea2bc 100644 --- a/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/codeLenses/codeLensReferencesIncludeImports.baseline.jsonc @@ -1,8 +1,4 @@ // === Code Lenses === -// === /other.ts === -// import { [|abc|] } from "./abc"; -// - // === /abc.ts === -// export function /*CODELENS: 1 reference*/abc() { } +// export function /*CODELENS: 0 references*/abc() { } // \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/documentHighlights/documentHighlights_filesToSearch.baseline.jsonc b/testdata/baselines/reference/fourslash/documentHighlights/documentHighlights_filesToSearch.baseline.jsonc index f5a2db2a5b..e8e985a42a 100644 --- a/testdata/baselines/reference/fourslash/documentHighlights/documentHighlights_filesToSearch.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/documentHighlights/documentHighlights_filesToSearch.baseline.jsonc @@ -6,4 +6,4 @@ // === documentHighlights === // === /b.ts === -// import { /*HIGHLIGHTS*/[|[|x|]|] } from "./a"; \ No newline at end of file +// import { /*HIGHLIGHTS*/[|x|] } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc index 27d6de3dd5..d6652ae187 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc @@ -1,6 +1,6 @@ // === findAllReferences === // === /bar.ts === -// import { [|[|Foo|]|]/*FIND ALL REFS*/ } from "./foo"; +// import { [|Foo|]/*FIND ALL REFS*/ } from "./foo"; // === /foo.ts === // export { [|Foo|] } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc index 1e8ae0b7f4..4e2671027f 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc @@ -14,11 +14,11 @@ // new D(); // === /b.ts === -// import { [|C|] } from "./a"; +// import { C } from "./a"; // new [|C|](); // === /c.ts === -// import { [|C|] } from "./a"; +// import { C } from "./a"; // class D extends C { // constructor() { // [|super|](); @@ -50,11 +50,11 @@ // new D(); // === /b.ts === -// import { [|C|] } from "./a"; +// import { C } from "./a"; // new [|C|](); // === /c.ts === -// import { [|C|] } from "./a"; +// import { C } from "./a"; // class D extends C { // constructor() { // [|super|](); @@ -86,11 +86,11 @@ // new D(); // === /b.ts === -// import { [|C|] } from "./a"; +// import { C } from "./a"; // new [|C|](); // === /c.ts === -// import { [|C|] } from "./a"; +// import { C } from "./a"; // class D extends C { // constructor() { // [|super|](); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc index fd541b971a..f5cf4ae9a5 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc @@ -13,7 +13,7 @@ // exports.[|A|] = class {}; // === /b.js === -// import { /*FIND ALL REFS*/[|[|A|]|] } from "./a"; +// import { /*FIND ALL REFS*/[|A|] } from "./a"; // [|A|]; @@ -23,5 +23,5 @@ // exports.[|A|] = class {}; // === /b.js === -// import { [|[|A|]|] } from "./a"; +// import { [|A|] } from "./a"; // /*FIND ALL REFS*/[|A|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportAsNamespace.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportAsNamespace.baseline.jsonc index 847f32a552..af8207ceac 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportAsNamespace.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportAsNamespace.baseline.jsonc @@ -13,7 +13,7 @@ // === findAllReferences === // === /b.ts === -// import { /*FIND ALL REFS*/[|[|f|]|] } from "a"; +// import { /*FIND ALL REFS*/[|f|] } from "a"; // === /c.ts === // A.[|f|](); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc index 8f029c69a0..e745202e15 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc @@ -14,4 +14,4 @@ // export const [|D|] = C; // === /b.ts === -// import { /*FIND ALL REFS*/[|[|D|]|] } from "./a"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|D|] } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc index c5fbf33222..8d4374f0f1 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc @@ -1,7 +1,7 @@ // === findAllReferences === // === /a.js === // /** -// * @import { [|[|A|]|] } from "./b"; +// * @import { [|A|] } from "./b"; // */ // // /** diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc index 00a66f1efc..0059cc284c 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc @@ -7,7 +7,7 @@ // --- (line: 5) skipped --- // === /player.js === -// import { [|[|Component|]|] } from './component.js'; +// import { [|Component|] } from './component.js'; // // /** // * @extends [|Component|]/*FIND ALL REFS*/ diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_multipleFiles.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_multipleFiles.baseline.jsonc index 81cb8c3451..8d1f4f8ead 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_multipleFiles.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_multipleFiles.baseline.jsonc @@ -6,7 +6,7 @@ // export { [|B|] as [|B1|] } from "./f"; // === /b.ts === -// import B, { [|B1|] } from "./a"; +// import B, { B1 } from "./a"; // const d = new [|B|]("b"); // const d1 = new [|B1|]("b1"); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc index f267740bca..7d231f7fa6 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc @@ -19,7 +19,7 @@ // } // === /b.ts === -// import { /*FIND ALL REFS*/[|[|Class|]|] } from "./a"; +// import { /*FIND ALL REFS*/[|Class|] } from "./a"; // // var c = new [|Class|](); @@ -34,7 +34,7 @@ // } // === /b.ts === -// import { [|[|Class|]|] } from "./a"; +// import { [|Class|] } from "./a"; // // var c = new /*FIND ALL REFS*/[|Class|](); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrefixSuffixPreference.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrefixSuffixPreference.baseline.jsonc index 179316f533..4909dd61cc 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrefixSuffixPreference.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrefixSuffixPreference.baseline.jsonc @@ -47,7 +47,7 @@ // === /file2.ts === // declare function log(s: string | number): void; -// import { /*FIND ALL REFS*/[|[|q|]|] } from "./file1"; +// import { /*FIND ALL REFS*/[|q|] } from "./file1"; // log([|q|] + 1); @@ -65,7 +65,7 @@ // === /file2.ts === // declare function log(s: string | number): void; -// import { [|[|q|]|] } from "./file1"; +// import { [|q|] } from "./file1"; // log(/*FIND ALL REFS*/[|q|] + 1); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportLocal.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportLocal.baseline.jsonc index 3ac954753b..147c24f1ef 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportLocal.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportLocal.baseline.jsonc @@ -41,7 +41,7 @@ // export { [|x|] as [|y|] }; // === /b.ts === -// import { /*FIND ALL REFS*/[|[|x|]|], [|y|] } from "./a"; +// import { /*FIND ALL REFS*/[|x|], [|y|] } from "./a"; // [|x|]; [|y|]; @@ -53,7 +53,7 @@ // export { [|x|] as [|y|] }; // === /b.ts === -// import { [|[|x|]|], [|y|] } from "./a"; +// import { [|x|], [|y|] } from "./a"; // /*FIND ALL REFS*/[|x|]; [|y|]; @@ -77,7 +77,7 @@ // export { x as [|y|] }; // === /b.ts === -// import { x, /*FIND ALL REFS*/[|[|y|]|] } from "./a"; +// import { x, /*FIND ALL REFS*/[|y|] } from "./a"; // x; [|y|]; @@ -89,5 +89,5 @@ // export { x as [|y|] }; // === /b.ts === -// import { x, [|[|y|]|] } from "./a"; +// import { x, [|y|] } from "./a"; // x; /*FIND ALL REFS*/[|y|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc index f624b63c25..690a325204 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc @@ -43,7 +43,7 @@ // === /c.ts === // export { x } from "./b"; -// import { /*FIND ALL REFS*/[|[|x|]|] } from "./a"; +// import { /*FIND ALL REFS*/[|x|] } from "./a"; // [|x|]; @@ -54,7 +54,7 @@ // === /c.ts === // export { x } from "./b"; -// import { [|[|x|]|] } from "./a"; +// import { [|x|] } from "./a"; // /*FIND ALL REFS*/[|x|]; @@ -69,4 +69,4 @@ // x; // === /d.ts === -// import { /*FIND ALL REFS*/[|[|x|]|] } from "./c"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|x|] } from "./c"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStar.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStar.baseline.jsonc index 7ef69da981..37e4edbc06 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStar.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStar.baseline.jsonc @@ -12,4 +12,4 @@ // export function [|foo|](): void {} // === /c.ts === -// import { /*FIND ALL REFS*/[|[|foo|]|] } from "./b"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|foo|] } from "./b"; \ 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 b2161f6cde..22a217bed3 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStarAs.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportStarAs.baseline.jsonc @@ -33,7 +33,7 @@ // export * as [|Leaf|] from './leafModule'; // === /importing.ts === -// import { /*FIND ALL REFS*/[|[|Leaf|]|] } from './exporting'; +// import { /*FIND ALL REFS*/[|Leaf|] } from './exporting'; // [|Leaf|].hello() @@ -43,5 +43,5 @@ // export * as [|Leaf|] from './leafModule'; // === /importing.ts === -// import { [|[|Leaf|]|] } from './exporting'; +// import { [|Leaf|] } from './exporting'; // /*FIND ALL REFS*/[|Leaf|].hello() \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportsUseInImportType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportsUseInImportType.baseline.jsonc index 8e0545b17e..a647cd1eb7 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportsUseInImportType.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExportsUseInImportType.baseline.jsonc @@ -62,7 +62,7 @@ // === findAllReferences === // === /app.ts === -// import { /*FIND ALL REFS*/[|[|foo|]|] } from './foo/types'; +// import { /*FIND ALL REFS*/[|foo|] } from './foo/types'; // export type fullType = [|foo|].Full; // type namespaceImport = typeof import('./foo/types'); // type fullType2 = import('./foo/types').[|foo|].Full; @@ -75,7 +75,7 @@ // === findAllReferences === // === /app.ts === -// import { [|[|foo|]|] } from './foo/types'; +// import { [|foo|] } from './foo/types'; // export type fullType = /*FIND ALL REFS*/[|foo|].Full; // type namespaceImport = typeof import('./foo/types'); // type fullType2 = import('./foo/types').[|foo|].Full; diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc index 5fe0096fe4..b0d90630ef 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc @@ -4,7 +4,7 @@ //
; // === /index.tsx === -// import { /*FIND ALL REFS*/[|[|SubmissionComp|]|] } from "./RedditSubmission" +// import { /*FIND ALL REFS*/[|SubmissionComp|] } from "./RedditSubmission" // function displaySubreddit(subreddit: string) { // let components = submissions // .map((value, index) => <[|SubmissionComp|] key={ index } elementPosition= { index } {...value.data} />); diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc index 7687de5b21..75f7ea71d1 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc @@ -13,5 +13,5 @@ // export var [|x|] = 12; // === /main.ts === -// import { /*FIND ALL REFS*/[|[|x|]|] } from "./m"; +// import { /*FIND ALL REFS*/[|x|] } from "./m"; // const y = [|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc index 43396aebb7..52a7e63c1b 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc @@ -12,4 +12,4 @@ // export function [|f|]() {} // === /b.ts === -// import { /*FIND ALL REFS*/[|[|f|]|] } from "./a"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|f|] } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatementKeywords.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatementKeywords.baseline.jsonc index 2de5e88d8e..568a75dd72 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatementKeywords.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatementKeywords.baseline.jsonc @@ -146,7 +146,7 @@ // // import ... from ... // import type B from "./b"; // import type * as C from "./c"; -// /*FIND ALL REFS*/import type { [|[|D|]|] } from "./d"; +// /*FIND ALL REFS*/import type { [|D|] } from "./d"; // import type { e1, e2 as e3 } from "./e"; // // // import "module" @@ -163,7 +163,7 @@ // // import ... from ... // import type B from "./b"; // import type * as C from "./c"; -// import /*FIND ALL REFS*/type { [|[|D|]|] } from "./d"; +// import /*FIND ALL REFS*/type { [|D|] } from "./d"; // import type { e1, e2 as e3 } from "./e"; // // // import "module" diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc index 8375b0d0b0..985ec38318 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc @@ -13,7 +13,7 @@ // export var [|a|]; // === /b.ts === -// import { /*FIND ALL REFS*/[|[|a|]|] } from './a'; +// import { /*FIND ALL REFS*/[|a|] } from './a'; // export { [|a|] }; @@ -23,5 +23,5 @@ // export var [|a|]; // === /b.ts === -// import { [|[|a|]|] } from './a'; +// import { [|a|] } from './a'; // export { /*FIND ALL REFS*/[|a|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc index 3363305ee8..febf7f8048 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc @@ -49,7 +49,7 @@ // export { [|N|] }; // Renaming N here would rename // } // declare module "b" { -// import { /*FIND ALL REFS*/[|[|N|]|] } from "a"; +// import { /*FIND ALL REFS*/[|N|] } from "a"; // export const y: typeof [|N|].x; // } diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfReExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfReExport.baseline.jsonc index 510da8ddb2..001ff3c4f1 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfReExport.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfReExport.baseline.jsonc @@ -37,6 +37,6 @@ // export { [|C|] } from "a"; // } // declare module "c" { -// import { /*FIND ALL REFS*/[|[|C|]|] } from "b"; +// import { /*FIND ALL REFS*/[|C|] } from "b"; // export function f(c: [|C|]): void; // } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports2.baseline.jsonc index 960cabf79a..e1028fead3 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports2.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports2.baseline.jsonc @@ -29,4 +29,4 @@ // [|B|].x; // === /c.ts === -// import { /*FIND ALL REFS*/[|[|B|]|] } from "./b"; \ No newline at end of file +// import { /*FIND ALL REFS*/[|B|] } from "./b"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports3.baseline.jsonc index 3954d09f81..0f9249e992 100644 --- a/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports3.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/transitiveExportImports3.baseline.jsonc @@ -21,7 +21,7 @@ // === /b.ts === // export { f as [|g|] } from "./a"; // import { f } from "./a"; -// import { /*FIND ALL REFS*/[|[|g|]|] } from "./b"; +// import { /*FIND ALL REFS*/[|g|] } from "./b"; @@ -31,5 +31,5 @@ // === /b.ts === // export { [|f|] as [|g|] } from "./a"; -// import { /*FIND ALL REFS*/[|[|f|]|] } from "./a"; +// import { /*FIND ALL REFS*/[|f|] } from "./a"; // import { [|g|] } from "./b"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline b/testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline index f46c0c1111..6425dbacf4 100644 --- a/testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline +++ b/testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline @@ -296,7 +296,7 @@ Config:: // === Code Lenses === // === /projects/container/compositeExec/index.ts === -// import { [|Pointable|] } from "../lib"; +// import { Pointable } from "../lib"; // class Point2 implements [|Pointable|] { // getX(): number { // return 0; @@ -304,7 +304,7 @@ Config:: // --- (line: 6) skipped --- // === /projects/container/exec/index.ts === -// import { [|Pointable|] } from "../lib"; +// import { Pointable } from "../lib"; // class Point1 implements [|Pointable|] { // getX(): number { // return 0; @@ -312,7 +312,7 @@ Config:: // --- (line: 6) skipped --- // === /projects/container/lib/bar.ts === -// import { [|Pointable|] } from "./index"; +// import { Pointable } from "./index"; // class Point implements [|Pointable|] { // getX(): number { // return 0; @@ -321,7 +321,7 @@ Config:: // === /projects/container/lib/index.ts === // -// export interface /*CODELENS: 6 references*/Pointable { +// export interface /*CODELENS: 3 references*/Pointable { // getX(): number; // getY(): number; // } diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline index 3cb1963b6c..fbf99a5940 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline @@ -78,7 +78,7 @@ Config File Names:: // === findAllReferences === // === /myproject/a/index.ts === -// import { [|[|B|]|] } from "../b/lib"; +// import { [|B|] } from "../b/lib"; // const b: /*FIND ALL REFS*/[|B|] = new [|B|](); // === /myproject/b/lib/index.d.ts === diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline index d0589635cb..04c077884c 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsDisabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline @@ -78,7 +78,7 @@ Config File Names:: // === findAllReferences === // === /myproject/a/index.ts === -// import { [|[|B|]|] } from "../b/lib"; +// import { [|B|] } from "../b/lib"; // const b: /*FIND ALL REFS*/[|B|] = new [|B|](); // === /myproject/b/lib/index.d.ts === diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline index 3a5acd0d41..10f5deff34 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreDisabledDeclMapIsMissing.baseline @@ -78,7 +78,7 @@ Config File Names:: // === findAllReferences === // === /myproject/a/index.ts === -// import { [|[|B|]|] } from "../b/lib"; +// import { [|B|] } from "../b/lib"; // const b: /*FIND ALL REFS*/[|B|] = new [|B|](); // === /myproject/b/lib/index.d.ts === diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline index 15f8bc1739..634f5d5ab0 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsDeclarationInOtherProjectProjIsNotLoadedRefdProjLoadingIsEnabledProjRefRedirectsAreEnabledDeclMapIsMissing.baseline @@ -78,7 +78,7 @@ Config File Names:: // === findAllReferences === // === /myproject/a/index.ts === -// import { [|[|B|]|] } from "../b/lib"; +// import { [|B|] } from "../b/lib"; // const b: /*FIND ALL REFS*/[|B|] = new [|B|](); // === /myproject/b/lib/index.d.ts === diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline index 3c0932a0b2..0c4e7f0b4c 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline @@ -344,7 +344,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|[|foo|]|] } from './helpers/functions'; +// import { [|foo|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline index 47b0e34794..6b9f877b4e 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline @@ -517,7 +517,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|[|foo|]|] } from './helpers/functions'; +// import { [|foo|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline index b5848de190..7e4db060dc 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline @@ -503,7 +503,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|[|foo|]|] } from './helpers/functions'; +// import { [|foo|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", @@ -585,7 +585,7 @@ Config:: // === findAllReferences === // === /myproject/indirect3/main.ts === -// import { /*FIND ALL REFS*/[|[|foo|]|] } from '../target/src/main'; +// import { /*FIND ALL REFS*/[|foo|] } from '../target/src/main'; // [|foo|]() // export function bar() {} @@ -593,5 +593,5 @@ Config:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|[|foo|]|] } from './helpers/functions'; +// import { [|foo|] } from './helpers/functions'; // export { [|foo|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline index 43010d8bb0..1a77760def 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline @@ -518,7 +518,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|[|foo|]|] } from './helpers/functions'; +// import { [|foo|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", diff --git a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline index 5a4b40013f..6cea2295d9 100644 --- a/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline +++ b/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline @@ -331,7 +331,7 @@ Config File Names:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|[|foo|]|] } from './helpers/functions'; +// import { [|foo|] } from './helpers/functions'; // export { /*FIND ALL REFS*/[|foo|] }; { "method": "textDocument/didClose", @@ -409,7 +409,7 @@ Config:: // === findAllReferences === // === /myproject/indirect3/main.ts === -// import { /*FIND ALL REFS*/[|[|foo|]|] } from '../target/src/main'; +// import { /*FIND ALL REFS*/[|foo|] } from '../target/src/main'; // [|foo|]() // export function bar() {} // @@ -418,5 +418,5 @@ Config:: // export function [|foo|]() { return 1; } // === /myproject/src/main.ts === -// import { [|[|foo|]|] } from './helpers/functions'; +// import { [|foo|] } from './helpers/functions'; // export { [|foo|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/state/implementationsAcrossProjects.baseline b/testdata/baselines/reference/fourslash/state/implementationsAcrossProjects.baseline index 9318e6345a..b073b575f1 100644 --- a/testdata/baselines/reference/fourslash/state/implementationsAcrossProjects.baseline +++ b/testdata/baselines/reference/fourslash/state/implementationsAcrossProjects.baseline @@ -213,7 +213,7 @@ Config:: // === goToImplementation === // === /projects/container/compositeExec/index.ts === -// <|import { [|Foo|] } from "../lib";|> +// import { Foo } from "../lib"; // <|class [|A2|] implements Foo { // func() {} // }|> @@ -222,7 +222,7 @@ Config:: // }|> // === /projects/container/exec/index.ts === -// <|import { [|Foo|] } from "../lib";|> +// import { Foo } from "../lib"; // <|class [|A1|] implements Foo { // func() {} // }|> @@ -231,7 +231,7 @@ Config:: // }|> // === /projects/container/lib/bar.ts === -// <|import {[|Foo|]} from './index'|> +// import {Foo} from './index' // <|class [|A|] implements Foo { // func() {} // }|> diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc index ea048b383b..86b3ad92be 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc @@ -1,4 +1,4 @@ // === goToImplementation === // === /ref.ts === -// <|import { [|Interface|] } from "./def";|> +// import { Interface } from "./def"; // const c: I/*GOTO IMPL*/nterface = { P: 2 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc.diff index 9e79603339..e7dd7931be 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc.diff +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationInterface_09.baseline.jsonc.diff @@ -3,7 +3,6 @@ @@= skipped -0, +0 lines =@@ // === goToImplementation === // === /ref.ts === --// import { Interface } from "./def"; + // import { Interface } from "./def"; -// const c: I/*GOTO IMPL*/nterface = [|{ P: 2 }|]; -+// <|import { [|Interface|] } from "./def";|> +// const c: I/*GOTO IMPL*/nterface = { P: 2 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc index b94f0cd2eb..2cf8e91944 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc @@ -1,4 +1,4 @@ // === goToImplementation === // === /ref.ts === -// <|import { [|TypeAlias|] } from "./def";|> +// import { TypeAlias } from "./def"; // const c: T/*GOTO IMPL*/ypeAlias = { P: 2 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc.diff index 914f136ab1..4f15fa96cc 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc.diff +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementationTypeAlias_00.baseline.jsonc.diff @@ -3,7 +3,6 @@ @@= skipped -0, +0 lines =@@ // === goToImplementation === // === /ref.ts === --// import { TypeAlias } from "./def"; + // import { TypeAlias } from "./def"; -// const c: T/*GOTO IMPL*/ypeAlias = [|{ P: 2 }|]; -+// <|import { [|TypeAlias|] } from "./def";|> +// const c: T/*GOTO IMPL*/ypeAlias = { P: 2 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc index c246733c5e..b2e3f3e351 100644 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc +++ b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc @@ -1,6 +1,6 @@ // === goToImplementation === // === /home/src/workspaces/project/bar.ts === -// import {[|Foo|]} from './foo' +// import {Foo} from './foo' // // class [|A|] implements Foo { // func() {} diff --git a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc.diff deleted file mode 100644 index 26650dacb8..0000000000 --- a/testdata/baselines/reference/submodule/fourslash/goToImplementation/goToImplementation_inDifferentFiles.baseline.jsonc.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.goToImplementation_inDifferentFiles.baseline.jsonc -+++ new.goToImplementation_inDifferentFiles.baseline.jsonc -@@= skipped -0, +0 lines =@@ - // === goToImplementation === - // === /home/src/workspaces/project/bar.ts === --// import {Foo} from './foo' -+// import {[|Foo|]} from './foo' - // - // class [|A|] implements Foo { - // func() {} \ No newline at end of file