From 1d1c58a4e3a13759d228297bceb3b7aabb891f97 Mon Sep 17 00:00:00 2001
From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Date: Tue, 21 Sep 2021 15:25:27 -0700
Subject: [PATCH] Explicitly sort keys
Needed for node 10 compatibility
---
src/harness/fourslashImpl.ts | 7 +-
.../duplicatePackageServices.baseline.jsonc | 24 +-
...ncesJsRequireDestructuring1.baseline.jsonc | 6 +-
...dAllReferencesOfConstructor.baseline.jsonc | 30 +-
...indAllReferencesTripleSlash.baseline.jsonc | 16 +-
...findAllRefsClassExpression0.baseline.jsonc | 34 +-
...findAllRefsClassExpression1.baseline.jsonc | 18 +-
.../findAllRefsCommonJsRequire.baseline.jsonc | 8 +-
...findAllRefsCommonJsRequire2.baseline.jsonc | 8 +-
...findAllRefsCommonJsRequire3.baseline.jsonc | 8 +-
.../findAllRefsDefaultImport.baseline.jsonc | 12 +-
...indAllRefsExportAsNamespace.baseline.jsonc | 18 +-
...RefsExportConstEqualToClass.baseline.jsonc | 12 +-
...findAllRefsForDefaultExport.baseline.jsonc | 6 +-
...ndAllRefsForDefaultExport04.baseline.jsonc | 24 +-
...fsForDefaultExportAnonymous.baseline.jsonc | 6 +-
.../findAllRefsForImportCall.baseline.jsonc | 6 +-
...AllRefsImportEqualsJsonFile.baseline.jsonc | 20 +-
.../findAllRefsImportNamed.baseline.jsonc | 8 +-
...efsImportStarOfExportEquals.baseline.jsonc | 30 +-
...OfConstructor_multipleFiles.baseline.jsonc | 10 +-
.../findAllRefsOnImportAliases.baseline.jsonc | 24 +-
...findAllRefsOnImportAliases2.baseline.jsonc | 18 +-
.../findAllRefsReExportLocal.baseline.jsonc | 26 +-
...eExportRightNameWrongSymbol.baseline.jsonc | 20 +-
.../findAllRefsReExportStar.baseline.jsonc | 12 +-
.../findAllRefsReExportStarAs.baseline.jsonc | 30 +-
.../findAllRefsReExports.baseline.jsonc | 1782 ++++++++---------
.../findAllRefsReExports2.baseline.jsonc | 6 +-
...efsReExportsUseInImportType.baseline.jsonc | 18 +-
...efsRenameImportWithSameName.baseline.jsonc | 12 +-
...findAllRefs_importType_js.1.baseline.jsonc | 8 +-
.../findReferencesJSXTagName.baseline.jsonc | 16 +-
...rrencesIsDefinitionOfExport.baseline.jsonc | 12 +-
.../indirectJsRequireRename.baseline.jsonc | 8 +-
...eImportAndExportInDiffFiles.baseline.jsonc | 18 +-
.../renameJsExports02.baseline.jsonc | 6 +-
.../transitiveExportImports2.baseline.jsonc | 18 +-
.../transitiveExportImports3.baseline.jsonc | 12 +-
39 files changed, 1178 insertions(+), 1179 deletions(-)
diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts
index 1505b110339..f9e22b19e92 100644
--- a/src/harness/fourslashImpl.ts
+++ b/src/harness/fourslashImpl.ts
@@ -1167,12 +1167,11 @@ namespace FourSlash {
this.goToMarker(markerName);
const marker = this.getMarkerByName(markerName);
const references = this.languageService.findReferences(marker.fileName, marker.position);
- const refsByFile = references
- ? ts.group(ts.sort(ts.flatMap(references, r => r.references), (a, b) => a.textSpan.start - b.textSpan.start), ref => ref.fileName)
- : ts.emptyArray;
+ const refsByFile = ts.arrayToMultiMap(ts.sort(ts.flatMap(references, r => r.references), (a, b) => a.textSpan.start - b.textSpan.start), ref => ref.fileName)
+ const refsSorted = ts.sort(ts.arrayFrom(refsByFile.keys())).map(k => refsByFile.get(k)!)
// Write input files
- const baselineContent = this.getBaselineContentForGroupedReferences(refsByFile, markerName);
+ const baselineContent = this.getBaselineContentForGroupedReferences(refsSorted, markerName);
// Write response JSON
return baselineContent + JSON.stringify(references, undefined, 2);
diff --git a/tests/baselines/reference/duplicatePackageServices.baseline.jsonc b/tests/baselines/reference/duplicatePackageServices.baseline.jsonc
index 5769b2172f6..313ed1a396b 100644
--- a/tests/baselines/reference/duplicatePackageServices.baseline.jsonc
+++ b/tests/baselines/reference/duplicatePackageServices.baseline.jsonc
@@ -2,15 +2,15 @@
// import [|X|]/*FIND ALL REFS*/ from "x";
// export function a(x: [|X|]): void;
-// === /node_modules/b/index.d.ts ===
-// import [|X|] from "x";
-// export const b: [|X|];
-
// === /node_modules/a/node_modules/x/index.d.ts ===
// export default class [|X|] {
// private x: number;
// }
+// === /node_modules/b/index.d.ts ===
+// import [|X|] from "x";
+// export const b: [|X|];
+
[
{
"definition": {
@@ -238,15 +238,15 @@
// import [|X|] from "x";
// export function a(x: [|X|]): void;
-// === /node_modules/b/index.d.ts ===
-// import [|X|] from "x";
-// export const b: [|X|];
-
// === /node_modules/a/node_modules/x/index.d.ts ===
// export default class /*FIND ALL REFS*/[|X|] {
// private x: number;
// }
+// === /node_modules/b/index.d.ts ===
+// import [|X|] from "x";
+// export const b: [|X|];
+
[
{
"definition": {
@@ -470,10 +470,6 @@
}
]
-// === /node_modules/b/index.d.ts ===
-// import [|X|]/*FIND ALL REFS*/ from "x";
-// export const b: [|X|];
-
// === /node_modules/a/index.d.ts ===
// import [|X|] from "x";
// export function a(x: [|X|]): void;
@@ -483,6 +479,10 @@
// private x: number;
// }
+// === /node_modules/b/index.d.ts ===
+// import [|X|]/*FIND ALL REFS*/ from "x";
+// export const b: [|X|];
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllReferencesJsRequireDestructuring1.baseline.jsonc b/tests/baselines/reference/findAllReferencesJsRequireDestructuring1.baseline.jsonc
index 84abe44e9a6..a1d07b653dd 100644
--- a/tests/baselines/reference/findAllReferencesJsRequireDestructuring1.baseline.jsonc
+++ b/tests/baselines/reference/findAllReferencesJsRequireDestructuring1.baseline.jsonc
@@ -1,9 +1,9 @@
-// === /Y.js ===
-// const { /*FIND ALL REFS*/[|x|]: { y } } = require("./X");
-
// === /X.js ===
// module.exports = { [|x|]: 1 };
+// === /Y.js ===
+// const { /*FIND ALL REFS*/[|x|]: { y } } = require("./X");
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllReferencesOfConstructor.baseline.jsonc b/tests/baselines/reference/findAllReferencesOfConstructor.baseline.jsonc
index 5dc8f1a37b1..e8510dbc468 100644
--- a/tests/baselines/reference/findAllReferencesOfConstructor.baseline.jsonc
+++ b/tests/baselines/reference/findAllReferencesOfConstructor.baseline.jsonc
@@ -16,11 +16,6 @@
// import { C } from "./a";
// new [|C|]();
-// === /tests/cases/fourslash/d.ts ===
-// import * as a from "./a";
-// new a.[|C|]();
-// class d extends a.C { constructor() { [|super|](); }
-
// === /tests/cases/fourslash/c.ts ===
// import { C } from "./a";
// class D extends C {
@@ -34,6 +29,11 @@
// constructor() { super(); }
// }
+// === /tests/cases/fourslash/d.ts ===
+// import * as a from "./a";
+// new a.[|C|]();
+// class d extends a.C { constructor() { [|super|](); }
+
[
{
"definition": {
@@ -311,11 +311,6 @@
// import { C } from "./a";
// new [|C|]();
-// === /tests/cases/fourslash/d.ts ===
-// import * as a from "./a";
-// new a.[|C|]();
-// class d extends a.C { constructor() { [|super|](); }
-
// === /tests/cases/fourslash/c.ts ===
// import { C } from "./a";
// class D extends C {
@@ -329,6 +324,11 @@
// constructor() { super(); }
// }
+// === /tests/cases/fourslash/d.ts ===
+// import * as a from "./a";
+// new a.[|C|]();
+// class d extends a.C { constructor() { [|super|](); }
+
[
{
"definition": {
@@ -606,11 +606,6 @@
// import { C } from "./a";
// new [|C|]();
-// === /tests/cases/fourslash/d.ts ===
-// import * as a from "./a";
-// new a.[|C|]();
-// class d extends a.C { constructor() { [|super|](); }
-
// === /tests/cases/fourslash/c.ts ===
// import { C } from "./a";
// class D extends C {
@@ -624,6 +619,11 @@
// constructor() { super(); }
// }
+// === /tests/cases/fourslash/d.ts ===
+// import * as a from "./a";
+// new a.[|C|]();
+// class d extends a.C { constructor() { [|super|](); }
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllReferencesTripleSlash.baseline.jsonc b/tests/baselines/reference/findAllReferencesTripleSlash.baseline.jsonc
index d53c912d4fb..353a68d1f93 100644
--- a/tests/baselines/reference/findAllReferencesTripleSlash.baseline.jsonc
+++ b/tests/baselines/reference/findAllReferencesTripleSlash.baseline.jsonc
@@ -1,11 +1,11 @@
-// === /c.js ===
-// require([|"./b"|]);
-// require("globals");
-
// === /a.ts ===
// ///
// ///
+// === /c.js ===
+// require([|"./b"|]);
+// require("globals");
+
[
{
"definition": {
@@ -48,14 +48,14 @@
}
]
-// === /c.js ===
-// require("./b");
-// require([|"globals"|]);
-
// === /a.ts ===
// ///
// ///
+// === /c.js ===
+// require("./b");
+// require([|"globals"|]);
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsClassExpression0.baseline.jsonc b/tests/baselines/reference/findAllRefsClassExpression0.baseline.jsonc
index ef7565d6cd2..64185fa29da 100644
--- a/tests/baselines/reference/findAllRefsClassExpression0.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsClassExpression0.baseline.jsonc
@@ -1,12 +1,12 @@
-// === /b.ts ===
-// import [|A|] = require("./a");
-// [|A|];
-
// === /a.ts ===
// export = class /*FIND ALL REFS*/[|A|] {
// m() { [|A|]; }
// };
+// === /b.ts ===
+// import [|A|] = require("./a");
+// [|A|];
+
[
{
"definition": {
@@ -196,15 +196,15 @@
}
]
-// === /b.ts ===
-// import [|A|] = require("./a");
-// [|A|];
-
// === /a.ts ===
// export = class [|A|] {
// m() { /*FIND ALL REFS*/[|A|]; }
// };
+// === /b.ts ===
+// import [|A|] = require("./a");
+// [|A|];
+
[
{
"definition": {
@@ -394,15 +394,15 @@
}
]
+// === /a.ts ===
+// export = class [|A|] {
+// m() { [|A|]; }
+// };
+
// === /b.ts ===
// import /*FIND ALL REFS*/[|A|] = require("./a");
// [|A|];
-// === /a.ts ===
-// export = class [|A|] {
-// m() { [|A|]; }
-// };
-
[
{
"definition": {
@@ -592,15 +592,15 @@
}
]
-// === /b.ts ===
-// import [|A|] = require("./a");
-// /*FIND ALL REFS*/[|A|];
-
// === /a.ts ===
// export = class [|A|] {
// m() { [|A|]; }
// };
+// === /b.ts ===
+// import [|A|] = require("./a");
+// /*FIND ALL REFS*/[|A|];
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsClassExpression1.baseline.jsonc b/tests/baselines/reference/findAllRefsClassExpression1.baseline.jsonc
index 61cf18eb464..8e47f27aacb 100644
--- a/tests/baselines/reference/findAllRefsClassExpression1.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsClassExpression1.baseline.jsonc
@@ -1,10 +1,10 @@
+// === /a.js ===
+// module.exports = class /*FIND ALL REFS*/[|A|] {};
+
// === /b.js ===
// import [|A|] = require("./a");
// [|A|];
-// === /a.js ===
-// module.exports = class /*FIND ALL REFS*/[|A|] {};
-
[
{
"definition": {
@@ -185,13 +185,13 @@
}
]
+// === /a.js ===
+// module.exports = class [|A|] {};
+
// === /b.js ===
// import /*FIND ALL REFS*/[|A|] = require("./a");
// [|A|];
-// === /a.js ===
-// module.exports = class [|A|] {};
-
[
{
"definition": {
@@ -372,13 +372,13 @@
}
]
+// === /a.js ===
+// module.exports = class [|A|] {};
+
// === /b.js ===
// import [|A|] = require("./a");
// /*FIND ALL REFS*/[|A|];
-// === /a.js ===
-// module.exports = class [|A|] {};
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsCommonJsRequire.baseline.jsonc b/tests/baselines/reference/findAllRefsCommonJsRequire.baseline.jsonc
index d6bed0659ba..32045e4f0a4 100644
--- a/tests/baselines/reference/findAllRefsCommonJsRequire.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsCommonJsRequire.baseline.jsonc
@@ -1,11 +1,11 @@
-// === /b.js ===
-// const { [|f|] } = require('./a')
-// /*FIND ALL REFS*/[|f|]
-
// === /a.js ===
// function [|f|]() { }
// export { [|f|] }
+// === /b.js ===
+// const { [|f|] } = require('./a')
+// /*FIND ALL REFS*/[|f|]
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsCommonJsRequire2.baseline.jsonc b/tests/baselines/reference/findAllRefsCommonJsRequire2.baseline.jsonc
index 3037fcb5bbe..007596a5e99 100644
--- a/tests/baselines/reference/findAllRefsCommonJsRequire2.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsCommonJsRequire2.baseline.jsonc
@@ -1,11 +1,11 @@
-// === /b.js ===
-// const { [|f|] } = require('./a')
-// /*FIND ALL REFS*/[|f|]
-
// === /a.js ===
// function f() { }
// module.exports.[|f|] = f
+// === /b.js ===
+// const { [|f|] } = require('./a')
+// /*FIND ALL REFS*/[|f|]
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc b/tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc
index 87d82f1ae6e..375703f3d04 100644
--- a/tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc
@@ -1,11 +1,11 @@
-// === /b.js ===
-// const { [|f|] } = require('./a')
-// /*FIND ALL REFS*/[|f|]
-
// === /a.js ===
// function [|f|]() { }
// module.exports = { [|f|] }
+// === /b.js ===
+// const { [|f|] } = require('./a')
+// /*FIND ALL REFS*/[|f|]
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsDefaultImport.baseline.jsonc b/tests/baselines/reference/findAllRefsDefaultImport.baseline.jsonc
index 9cf1d55f570..a40e2f9b420 100644
--- a/tests/baselines/reference/findAllRefsDefaultImport.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsDefaultImport.baseline.jsonc
@@ -1,9 +1,9 @@
-// === /b.ts ===
-// import [|a|], * as ns from "./a";
-
// === /a.ts ===
// export default function /*FIND ALL REFS*/[|a|]() {}
+// === /b.ts ===
+// import [|a|], * as ns from "./a";
+
[
{
"definition": {
@@ -171,12 +171,12 @@
}
]
-// === /b.ts ===
-// import /*FIND ALL REFS*/[|a|], * as ns from "./a";
-
// === /a.ts ===
// export default function [|a|]() {}
+// === /b.ts ===
+// import /*FIND ALL REFS*/[|a|], * as ns from "./a";
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsExportAsNamespace.baseline.jsonc b/tests/baselines/reference/findAllRefsExportAsNamespace.baseline.jsonc
index 284382f245c..1a4579eb198 100644
--- a/tests/baselines/reference/findAllRefsExportAsNamespace.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsExportAsNamespace.baseline.jsonc
@@ -1,9 +1,9 @@
-// === /c.ts ===
-// A.[|f|]();
-
// === /b.ts ===
// import { [|f|] } from "a";
+// === /c.ts ===
+// A.[|f|]();
+
// === /node_modules/a/index.d.ts ===
// export function /*FIND ALL REFS*/[|f|](): void;
// export as namespace A;
@@ -184,12 +184,12 @@
}
]
-// === /c.ts ===
-// A.[|f|]();
-
// === /b.ts ===
// import { /*FIND ALL REFS*/[|f|] } from "a";
+// === /c.ts ===
+// A.[|f|]();
+
// === /node_modules/a/index.d.ts ===
// export function [|f|](): void;
// export as namespace A;
@@ -370,12 +370,12 @@
}
]
-// === /c.ts ===
-// A./*FIND ALL REFS*/[|f|]();
-
// === /b.ts ===
// import { [|f|] } from "a";
+// === /c.ts ===
+// A./*FIND ALL REFS*/[|f|]();
+
// === /node_modules/a/index.d.ts ===
// export function [|f|](): void;
// export as namespace A;
diff --git a/tests/baselines/reference/findAllRefsExportConstEqualToClass.baseline.jsonc b/tests/baselines/reference/findAllRefsExportConstEqualToClass.baseline.jsonc
index 97152aefeea..d67f8d265f5 100644
--- a/tests/baselines/reference/findAllRefsExportConstEqualToClass.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsExportConstEqualToClass.baseline.jsonc
@@ -1,10 +1,10 @@
-// === /b.ts ===
-// import { [|D|] } from "./a";
-
// === /a.ts ===
// class C {}
// export const /*FIND ALL REFS*/[|D|] = C;
+// === /b.ts ===
+// import { [|D|] } from "./a";
+
[
{
"definition": {
@@ -172,13 +172,13 @@
}
]
-// === /b.ts ===
-// import { /*FIND ALL REFS*/[|D|] } from "./a";
-
// === /a.ts ===
// class C {}
// export const [|D|] = C;
+// === /b.ts ===
+// import { /*FIND ALL REFS*/[|D|] } from "./a";
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsForDefaultExport.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExport.baseline.jsonc
index 6694faed280..60798128ca8 100644
--- a/tests/baselines/reference/findAllRefsForDefaultExport.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsForDefaultExport.baseline.jsonc
@@ -1,10 +1,10 @@
+// === /tests/cases/fourslash/a.ts ===
+// export default function /*FIND ALL REFS*/[|f|]() {}
+
// === /tests/cases/fourslash/b.ts ===
// import [|g|] from "./a";
// [|g|]();
-// === /tests/cases/fourslash/a.ts ===
-// export default function /*FIND ALL REFS*/[|f|]() {}
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsForDefaultExport04.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExport04.baseline.jsonc
index 86d5233e7e8..a964c7675cd 100644
--- a/tests/baselines/reference/findAllRefsForDefaultExport04.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsForDefaultExport04.baseline.jsonc
@@ -360,14 +360,14 @@
}
]
-// === /b.ts ===
-// import [|a|] from "./a";
-// [|a|];
-
// === /a.ts ===
// const a = 0;
// export /*FIND ALL REFS*/[|default|] a;
+// === /b.ts ===
+// import [|a|] from "./a";
+// [|a|];
+
[
{
"definition": {
@@ -568,14 +568,14 @@
}
]
+// === /a.ts ===
+// const a = 0;
+// export [|default|] a;
+
// === /b.ts ===
// import /*FIND ALL REFS*/[|a|] from "./a";
// [|a|];
-// === /a.ts ===
-// const a = 0;
-// export [|default|] a;
-
[
{
"definition": {
@@ -776,14 +776,14 @@
}
]
-// === /b.ts ===
-// import [|a|] from "./a";
-// /*FIND ALL REFS*/[|a|];
-
// === /a.ts ===
// const a = 0;
// export [|default|] a;
+// === /b.ts ===
+// import [|a|] from "./a";
+// /*FIND ALL REFS*/[|a|];
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsForDefaultExportAnonymous.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExportAnonymous.baseline.jsonc
index b9072776ca1..1d5238e9c87 100644
--- a/tests/baselines/reference/findAllRefsForDefaultExportAnonymous.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsForDefaultExportAnonymous.baseline.jsonc
@@ -115,12 +115,12 @@
}
]
-// === /b.ts ===
-// import /*FIND ALL REFS*/[|f|] from "./a";
-
// === /a.ts ===
// export [|default|] function() {}
+// === /b.ts ===
+// import /*FIND ALL REFS*/[|f|] from "./a";
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsForImportCall.baseline.jsonc b/tests/baselines/reference/findAllRefsForImportCall.baseline.jsonc
index a64732cd615..42c4d6357e1 100644
--- a/tests/baselines/reference/findAllRefsForImportCall.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsForImportCall.baseline.jsonc
@@ -1,15 +1,15 @@
// === /app.ts ===
// export function [|he/*FIND ALL REFS*/llo|]() {};
-// === /indirect-use.ts ===
-// import("./re-export").then(mod => mod.services.app.[|hello|]());
-
// === /direct-use.ts ===
// async function main() {
// const mod = await import("./app")
// mod.[|hello|]();
// }
+// === /indirect-use.ts ===
+// import("./re-export").then(mod => mod.services.app.[|hello|]());
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsImportEqualsJsonFile.baseline.jsonc b/tests/baselines/reference/findAllRefsImportEqualsJsonFile.baseline.jsonc
index 8f914b90f9f..aa23ae7b0cb 100644
--- a/tests/baselines/reference/findAllRefsImportEqualsJsonFile.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsImportEqualsJsonFile.baseline.jsonc
@@ -178,16 +178,16 @@
}
]
-// === /j.json ===
-// [|{ "x": 0 }|]
+// === /a.ts ===
+// import j = require("/*FIND ALL REFS*/[|./j.json|]");
+// j;
// === /b.js ===
// const j = require("[|./j.json|]");
// j;
-// === /a.ts ===
-// import j = require("/*FIND ALL REFS*/[|./j.json|]");
-// j;
+// === /j.json ===
+// [|{ "x": 0 }|]
[
{
@@ -256,16 +256,16 @@
}
]
-// === /j.json ===
-// [|{ "x": 0 }|]
+// === /a.ts ===
+// import j = require("[|./j.json|]");
+// j;
// === /b.js ===
// const j = require("/*FIND ALL REFS*/[|./j.json|]");
// j;
-// === /a.ts ===
-// import j = require("[|./j.json|]");
-// j;
+// === /j.json ===
+// [|{ "x": 0 }|]
[
{
diff --git a/tests/baselines/reference/findAllRefsImportNamed.baseline.jsonc b/tests/baselines/reference/findAllRefsImportNamed.baseline.jsonc
index b38afeb149c..b5221c0ee52 100644
--- a/tests/baselines/reference/findAllRefsImportNamed.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsImportNamed.baseline.jsonc
@@ -1,11 +1,11 @@
-// === /tests/cases/fourslash/f.ts ===
-// export { [|foo|] as [|foo|] }
-// function /*FIND ALL REFS*/[|foo|](a: number, b: number) { }
-
// === /tests/cases/fourslash/b.ts ===
// import x = require("./f");
// x.[|foo|](1, 2);
+// === /tests/cases/fourslash/f.ts ===
+// export { [|foo|] as [|foo|] }
+// function /*FIND ALL REFS*/[|foo|](a: number, b: number) { }
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsImportStarOfExportEquals.baseline.jsonc b/tests/baselines/reference/findAllRefsImportStarOfExportEquals.baseline.jsonc
index e56b6472251..b472a3d78b2 100644
--- a/tests/baselines/reference/findAllRefsImportStarOfExportEquals.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsImportStarOfExportEquals.baseline.jsonc
@@ -1582,16 +1582,16 @@
}
]
-// === /c.ts ===
-// import /*FIND ALL REFS*/[|a|] from "a";
-// [|a|]();
-// [|a|].x;
-
// === /b.ts ===
// import [|b|] from "a";
// [|b|]();
// [|b|].x;
+// === /c.ts ===
+// import /*FIND ALL REFS*/[|a|] from "a";
+// [|a|]();
+// [|a|].x;
+
// === /node_modules/a/index.d.ts ===
// declare function [|a|](): void;
// declare namespace [|a|] {
@@ -2006,16 +2006,16 @@
}
]
+// === /b.ts ===
+// import [|b|] from "a";
+// [|b|]();
+// [|b|].x;
+
// === /c.ts ===
// import [|a|] from "a";
// /*FIND ALL REFS*/[|a|]();
// [|a|].x;
-// === /b.ts ===
-// import [|b|] from "a";
-// [|b|]();
-// [|b|].x;
-
// === /node_modules/a/index.d.ts ===
// declare function [|a|](): void;
// declare namespace [|a|] {
@@ -2430,16 +2430,16 @@
}
]
-// === /c.ts ===
-// import [|a|] from "a";
-// [|a|]();
-// /*FIND ALL REFS*/[|a|].x;
-
// === /b.ts ===
// import [|b|] from "a";
// [|b|]();
// [|b|].x;
+// === /c.ts ===
+// import [|a|] from "a";
+// [|a|]();
+// /*FIND ALL REFS*/[|a|].x;
+
// === /node_modules/a/index.d.ts ===
// declare function [|a|](): void;
// declare namespace [|a|] {
diff --git a/tests/baselines/reference/findAllRefsOfConstructor_multipleFiles.baseline.jsonc b/tests/baselines/reference/findAllRefsOfConstructor_multipleFiles.baseline.jsonc
index c9770e8846e..2ba32fb124b 100644
--- a/tests/baselines/reference/findAllRefsOfConstructor_multipleFiles.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsOfConstructor_multipleFiles.baseline.jsonc
@@ -4,6 +4,11 @@
// export default class extends A1 { }
// export { [|B|] as [|B1|] } from "./f";
+// === /tests/cases/fourslash/b.ts ===
+// import B, { B1 } from "./a";
+// const d = new [|B|]("b");
+// const d1 = new [|B1|]("b1");
+
// === /tests/cases/fourslash/f.ts ===
// class A {
// /*FIND ALL REFS*/[|constructor|](s: string) {}
@@ -11,11 +16,6 @@
// class B extends A { }
// export { [|A|], [|B|] };
-// === /tests/cases/fourslash/b.ts ===
-// import B, { B1 } from "./a";
-// const d = new [|B|]("b");
-// const d1 = new [|B1|]("b1");
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsOnImportAliases.baseline.jsonc b/tests/baselines/reference/findAllRefsOnImportAliases.baseline.jsonc
index 76c8329df54..0fefbc8e179 100644
--- a/tests/baselines/reference/findAllRefsOnImportAliases.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsOnImportAliases.baseline.jsonc
@@ -1,3 +1,7 @@
+// === /tests/cases/fourslash/a.ts ===
+// export class /*FIND ALL REFS*/[|Class|] {
+// }
+
// === /tests/cases/fourslash/b.ts ===
// import { [|Class|] } from "./a";
//
@@ -6,10 +10,6 @@
// === /tests/cases/fourslash/c.ts ===
// export { [|Class|] } from "./a";
-// === /tests/cases/fourslash/a.ts ===
-// export class /*FIND ALL REFS*/[|Class|] {
-// }
-
[
{
"definition": {
@@ -224,6 +224,10 @@
}
]
+// === /tests/cases/fourslash/a.ts ===
+// export class [|Class|] {
+// }
+
// === /tests/cases/fourslash/b.ts ===
// import { /*FIND ALL REFS*/[|Class|] } from "./a";
//
@@ -232,10 +236,6 @@
// === /tests/cases/fourslash/c.ts ===
// export { [|Class|] } from "./a";
-// === /tests/cases/fourslash/a.ts ===
-// export class [|Class|] {
-// }
-
[
{
"definition": {
@@ -450,6 +450,10 @@
}
]
+// === /tests/cases/fourslash/a.ts ===
+// export class [|Class|] {
+// }
+
// === /tests/cases/fourslash/b.ts ===
// import { [|Class|] } from "./a";
//
@@ -458,10 +462,6 @@
// === /tests/cases/fourslash/c.ts ===
// export { [|Class|] } from "./a";
-// === /tests/cases/fourslash/a.ts ===
-// export class [|Class|] {
-// }
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsOnImportAliases2.baseline.jsonc b/tests/baselines/reference/findAllRefsOnImportAliases2.baseline.jsonc
index ff58b1ff5ca..abbf5799517 100644
--- a/tests/baselines/reference/findAllRefsOnImportAliases2.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsOnImportAliases2.baseline.jsonc
@@ -1,3 +1,6 @@
+// === /tests/cases/fourslash/a.ts ===
+// export class /*FIND ALL REFS*/[|Class|] {}
+
// === /tests/cases/fourslash/b.ts ===
// import { [|Class|] as [|C2|] } from "./a";
// var c = new [|C2|]();
@@ -5,9 +8,6 @@
// === /tests/cases/fourslash/c.ts ===
// export { [|Class|] as [|C3|] } from "./a";
-// === /tests/cases/fourslash/a.ts ===
-// export class /*FIND ALL REFS*/[|Class|] {}
-
[
{
"definition": {
@@ -248,6 +248,9 @@
}
]
+// === /tests/cases/fourslash/a.ts ===
+// export class [|Class|] {}
+
// === /tests/cases/fourslash/b.ts ===
// import { /*FIND ALL REFS*/[|Class|] as [|C2|] } from "./a";
// var c = new [|C2|]();
@@ -255,9 +258,6 @@
// === /tests/cases/fourslash/c.ts ===
// export { [|Class|] as [|C3|] } from "./a";
-// === /tests/cases/fourslash/a.ts ===
-// export class [|Class|] {}
-
[
{
"definition": {
@@ -498,6 +498,9 @@
}
]
+// === /tests/cases/fourslash/a.ts ===
+// export class [|Class|] {}
+
// === /tests/cases/fourslash/b.ts ===
// import { [|Class|] as [|C2|] } from "./a";
// var c = new [|C2|]();
@@ -505,9 +508,6 @@
// === /tests/cases/fourslash/c.ts ===
// export { /*FIND ALL REFS*/[|Class|] as [|C3|] } from "./a";
-// === /tests/cases/fourslash/a.ts ===
-// export class [|Class|] {}
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsReExportLocal.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportLocal.baseline.jsonc
index db7b4693bf9..05526fd28e1 100644
--- a/tests/baselines/reference/findAllRefsReExportLocal.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsReExportLocal.baseline.jsonc
@@ -1918,15 +1918,15 @@
}
]
-// === /b.ts ===
-// import { x, [|y|] } from "./a";
-// x; [|y|];
-
// === /a.ts ===
// var x;
// export { x };
// export { x as /*FIND ALL REFS*/[|y|] };
+// === /b.ts ===
+// import { x, [|y|] } from "./a";
+// x; [|y|];
+
[
{
"definition": {
@@ -2119,15 +2119,15 @@
}
]
+// === /a.ts ===
+// var x;
+// export { x };
+// export { x as [|y|] };
+
// === /b.ts ===
// import { x, /*FIND ALL REFS*/[|y|] } from "./a";
// x; [|y|];
-// === /a.ts ===
-// var x;
-// export { x };
-// export { x as [|y|] };
-
[
{
"definition": {
@@ -2320,15 +2320,15 @@
}
]
-// === /b.ts ===
-// import { x, [|y|] } from "./a";
-// x; /*FIND ALL REFS*/[|y|];
-
// === /a.ts ===
// var x;
// export { x };
// export { x as [|y|] };
+// === /b.ts ===
+// import { x, [|y|] } from "./a";
+// x; /*FIND ALL REFS*/[|y|];
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc
index f87592b41ae..075839fb6ce 100644
--- a/tests/baselines/reference/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc
@@ -166,6 +166,9 @@
}
]
+// === /b.ts ===
+// export const /*FIND ALL REFS*/[|x|] = 0;
+
// === /c.ts ===
// export { [|x|] } from "./b";
// import { x } from "./a";
@@ -174,9 +177,6 @@
// === /d.ts ===
// import { [|x|] } from "./c";
-// === /b.ts ===
-// export const /*FIND ALL REFS*/[|x|] = 0;
-
[
{
"definition": {
@@ -418,6 +418,9 @@
}
]
+// === /b.ts ===
+// export const [|x|] = 0;
+
// === /c.ts ===
// export { /*FIND ALL REFS*/[|x|] } from "./b";
// import { x } from "./a";
@@ -426,9 +429,6 @@
// === /d.ts ===
// import { [|x|] } from "./c";
-// === /b.ts ===
-// export const [|x|] = 0;
-
[
{
"definition": {
@@ -1006,16 +1006,16 @@
}
]
-// === /d.ts ===
-// import { /*FIND ALL REFS*/[|x|] } from "./c";
+// === /b.ts ===
+// export const [|x|] = 0;
// === /c.ts ===
// export { [|x|] } from "./b";
// import { x } from "./a";
// x;
-// === /b.ts ===
-// export const [|x|] = 0;
+// === /d.ts ===
+// import { /*FIND ALL REFS*/[|x|] } from "./c";
[
{
diff --git a/tests/baselines/reference/findAllRefsReExportStar.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportStar.baseline.jsonc
index d7214a8092c..a1080774509 100644
--- a/tests/baselines/reference/findAllRefsReExportStar.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsReExportStar.baseline.jsonc
@@ -1,9 +1,9 @@
-// === /c.ts ===
-// import { [|foo|] } from "./b";
-
// === /a.ts ===
// export function /*FIND ALL REFS*/[|foo|](): void {}
+// === /c.ts ===
+// import { [|foo|] } from "./b";
+
[
{
"definition": {
@@ -171,12 +171,12 @@
}
]
-// === /c.ts ===
-// import { /*FIND ALL REFS*/[|foo|] } from "./b";
-
// === /a.ts ===
// export function [|foo|](): void {}
+// === /c.ts ===
+// import { /*FIND ALL REFS*/[|foo|] } from "./b";
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsReExportStarAs.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportStarAs.baseline.jsonc
index 5b0c470f74a..629dbe83568 100644
--- a/tests/baselines/reference/findAllRefsReExportStarAs.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsReExportStarAs.baseline.jsonc
@@ -1,10 +1,10 @@
-// === /leafModule.ts ===
-// export const /*FIND ALL REFS*/[|hello|] = () => 'Hello';
-
// === /importing.ts ===
// import { Leaf } from './exporting';
// Leaf.[|hello|]()
+// === /leafModule.ts ===
+// export const /*FIND ALL REFS*/[|hello|] = () => 'Hello';
+
[
{
"definition": {
@@ -95,13 +95,13 @@
}
]
-// === /leafModule.ts ===
-// export const [|hello|] = () => 'Hello';
-
// === /importing.ts ===
// import { Leaf } from './exporting';
// Leaf./*FIND ALL REFS*/[|hello|]()
+// === /leafModule.ts ===
+// export const [|hello|] = () => 'Hello';
+
[
{
"definition": {
@@ -192,13 +192,13 @@
}
]
+// === /exporting.ts ===
+// export * as /*FIND ALL REFS*/[|Leaf|] from './leafModule';
+
// === /importing.ts ===
// import { [|Leaf|] } from './exporting';
// [|Leaf|].hello()
-// === /exporting.ts ===
-// export * as /*FIND ALL REFS*/[|Leaf|] from './leafModule';
-
[
{
"definition": {
@@ -303,13 +303,13 @@
}
]
+// === /exporting.ts ===
+// export * as [|Leaf|] from './leafModule';
+
// === /importing.ts ===
// import { /*FIND ALL REFS*/[|Leaf|] } from './exporting';
// [|Leaf|].hello()
-// === /exporting.ts ===
-// export * as [|Leaf|] from './leafModule';
-
[
{
"definition": {
@@ -414,13 +414,13 @@
}
]
+// === /exporting.ts ===
+// export * as [|Leaf|] from './leafModule';
+
// === /importing.ts ===
// import { [|Leaf|] } from './exporting';
// /*FIND ALL REFS*/[|Leaf|].hello()
-// === /exporting.ts ===
-// export * as [|Leaf|] from './leafModule';
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsReExports.baseline.jsonc b/tests/baselines/reference/findAllRefsReExports.baseline.jsonc
index bfe953f1940..1c8a5d02e4b 100644
--- a/tests/baselines/reference/findAllRefsReExports.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsReExports.baseline.jsonc
@@ -1,9 +1,15 @@
+// === /a.ts ===
+// export function /*FIND ALL REFS*/[|foo|](): void {}
+
// === /b.ts ===
// export { [|foo|] as [|bar|] } from "./a";
// === /c.ts ===
// export { [|foo|] as [|default|] } from "./a";
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
// === /e.ts ===
// import { [|bar|] } from "./b";
// import [|baz|] from "./c";
@@ -11,12 +17,6 @@
// import [|boom|] from "./d";
// [|bar|](); [|baz|](); [|bang|](); [|boom|]();
-// === /d.ts ===
-// export { [|default|] } from "./c";
-
-// === /a.ts ===
-// export function /*FIND ALL REFS*/[|foo|](): void {}
-
[
{
"definition": {
@@ -847,12 +847,18 @@
}
]
+// === /a.ts ===
+// export function [|foo|](): void {}
+
// === /b.ts ===
// export { /*FIND ALL REFS*/[|foo|] as [|bar|] } from "./a";
// === /c.ts ===
// export { [|foo|] as [|default|] } from "./a";
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
// === /e.ts ===
// import { [|bar|] } from "./b";
// import [|baz|] from "./c";
@@ -860,12 +866,855 @@
// import [|boom|] from "./d";
// [|bar|](); [|baz|](); [|bang|](); [|boom|]();
-// === /d.ts ===
-// export { [|default|] } from "./c";
+[
+ {
+ "definition": {
+ "containerKind": "",
+ "containerName": "",
+ "fileName": "/a.ts",
+ "kind": "function",
+ "name": "function foo(): void",
+ "textSpan": {
+ "start": 16,
+ "length": 3
+ },
+ "displayParts": [
+ {
+ "text": "function",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "foo",
+ "kind": "functionName"
+ },
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": ":",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "void",
+ "kind": "keyword"
+ }
+ ],
+ "contextSpan": {
+ "start": 0,
+ "length": 30
+ }
+ },
+ "references": [
+ {
+ "textSpan": {
+ "start": 16,
+ "length": 3
+ },
+ "fileName": "/a.ts",
+ "contextSpan": {
+ "start": 0,
+ "length": 30
+ },
+ "isWriteAccess": true,
+ "isDefinition": true
+ },
+ {
+ "textSpan": {
+ "start": 9,
+ "length": 3
+ },
+ "fileName": "/b.ts",
+ "contextSpan": {
+ "start": 0,
+ "length": 33
+ },
+ "isWriteAccess": false,
+ "isDefinition": false
+ },
+ {
+ "textSpan": {
+ "start": 9,
+ "length": 3
+ },
+ "fileName": "/c.ts",
+ "contextSpan": {
+ "start": 0,
+ "length": 37
+ },
+ "isWriteAccess": false,
+ "isDefinition": false
+ }
+ ]
+ },
+ {
+ "definition": {
+ "containerKind": "",
+ "containerName": "",
+ "fileName": "/b.ts",
+ "kind": "alias",
+ "name": "(alias) function bar(): void\nexport bar",
+ "textSpan": {
+ "start": 16,
+ "length": 3
+ },
+ "displayParts": [
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": "alias",
+ "kind": "text"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "function",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "bar",
+ "kind": "aliasName"
+ },
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": ":",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "void",
+ "kind": "keyword"
+ },
+ {
+ "text": "\n",
+ "kind": "lineBreak"
+ },
+ {
+ "text": "export",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "bar",
+ "kind": "aliasName"
+ }
+ ],
+ "contextSpan": {
+ "start": 0,
+ "length": 33
+ }
+ },
+ "references": [
+ {
+ "textSpan": {
+ "start": 16,
+ "length": 3
+ },
+ "fileName": "/b.ts",
+ "contextSpan": {
+ "start": 0,
+ "length": 33
+ },
+ "isWriteAccess": true,
+ "isDefinition": true
+ }
+ ]
+ },
+ {
+ "definition": {
+ "containerKind": "",
+ "containerName": "",
+ "fileName": "/e.ts",
+ "kind": "alias",
+ "name": "(alias) function bar(): void\nimport bar",
+ "textSpan": {
+ "start": 9,
+ "length": 3
+ },
+ "displayParts": [
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": "alias",
+ "kind": "text"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "function",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "bar",
+ "kind": "aliasName"
+ },
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": ":",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "void",
+ "kind": "keyword"
+ },
+ {
+ "text": "\n",
+ "kind": "lineBreak"
+ },
+ {
+ "text": "import",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "bar",
+ "kind": "aliasName"
+ }
+ ],
+ "contextSpan": {
+ "start": 0,
+ "length": 26
+ }
+ },
+ "references": [
+ {
+ "textSpan": {
+ "start": 9,
+ "length": 3
+ },
+ "fileName": "/e.ts",
+ "contextSpan": {
+ "start": 0,
+ "length": 26
+ },
+ "isWriteAccess": true,
+ "isDefinition": true
+ },
+ {
+ "textSpan": {
+ "start": 113,
+ "length": 3
+ },
+ "fileName": "/e.ts",
+ "isWriteAccess": false,
+ "isDefinition": false
+ }
+ ]
+ },
+ {
+ "definition": {
+ "containerKind": "",
+ "containerName": "",
+ "fileName": "/c.ts",
+ "kind": "alias",
+ "name": "(alias) function foo(): void\nexport default",
+ "textSpan": {
+ "start": 16,
+ "length": 7
+ },
+ "displayParts": [
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": "alias",
+ "kind": "text"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "function",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "foo",
+ "kind": "functionName"
+ },
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": ":",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "void",
+ "kind": "keyword"
+ },
+ {
+ "text": "\n",
+ "kind": "lineBreak"
+ },
+ {
+ "text": "export",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "default",
+ "kind": "aliasName"
+ }
+ ],
+ "contextSpan": {
+ "start": 0,
+ "length": 37
+ }
+ },
+ "references": [
+ {
+ "textSpan": {
+ "start": 16,
+ "length": 7
+ },
+ "fileName": "/c.ts",
+ "contextSpan": {
+ "start": 0,
+ "length": 37
+ },
+ "isWriteAccess": true,
+ "isDefinition": true
+ },
+ {
+ "textSpan": {
+ "start": 59,
+ "length": 7
+ },
+ "fileName": "/e.ts",
+ "contextSpan": {
+ "start": 50,
+ "length": 38
+ },
+ "isWriteAccess": false,
+ "isDefinition": false
+ }
+ ]
+ },
+ {
+ "definition": {
+ "containerKind": "",
+ "containerName": "",
+ "fileName": "/d.ts",
+ "kind": "alias",
+ "name": "(alias) function foo(): void\nexport default",
+ "textSpan": {
+ "start": 9,
+ "length": 7
+ },
+ "displayParts": [
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": "alias",
+ "kind": "text"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "function",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "foo",
+ "kind": "functionName"
+ },
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": ":",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "void",
+ "kind": "keyword"
+ },
+ {
+ "text": "\n",
+ "kind": "lineBreak"
+ },
+ {
+ "text": "export",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "default",
+ "kind": "aliasName"
+ }
+ ],
+ "contextSpan": {
+ "start": 0,
+ "length": 30
+ }
+ },
+ "references": [
+ {
+ "textSpan": {
+ "start": 9,
+ "length": 7
+ },
+ "fileName": "/d.ts",
+ "contextSpan": {
+ "start": 0,
+ "length": 30
+ },
+ "isWriteAccess": true,
+ "isDefinition": true
+ }
+ ]
+ },
+ {
+ "definition": {
+ "containerKind": "",
+ "containerName": "",
+ "fileName": "/e.ts",
+ "kind": "alias",
+ "name": "(alias) function boom(): void\nimport boom",
+ "textSpan": {
+ "start": 96,
+ "length": 4
+ },
+ "displayParts": [
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": "alias",
+ "kind": "text"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "function",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "boom",
+ "kind": "aliasName"
+ },
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": ":",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "void",
+ "kind": "keyword"
+ },
+ {
+ "text": "\n",
+ "kind": "lineBreak"
+ },
+ {
+ "text": "import",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "boom",
+ "kind": "aliasName"
+ }
+ ],
+ "contextSpan": {
+ "start": 89,
+ "length": 23
+ }
+ },
+ "references": [
+ {
+ "textSpan": {
+ "start": 96,
+ "length": 4
+ },
+ "fileName": "/e.ts",
+ "contextSpan": {
+ "start": 89,
+ "length": 23
+ },
+ "isWriteAccess": true,
+ "isDefinition": true
+ },
+ {
+ "textSpan": {
+ "start": 135,
+ "length": 4
+ },
+ "fileName": "/e.ts",
+ "isWriteAccess": false,
+ "isDefinition": false
+ }
+ ]
+ },
+ {
+ "definition": {
+ "containerKind": "",
+ "containerName": "",
+ "fileName": "/e.ts",
+ "kind": "alias",
+ "name": "(alias) function baz(): void\nimport baz",
+ "textSpan": {
+ "start": 34,
+ "length": 3
+ },
+ "displayParts": [
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": "alias",
+ "kind": "text"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "function",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "baz",
+ "kind": "aliasName"
+ },
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": ":",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "void",
+ "kind": "keyword"
+ },
+ {
+ "text": "\n",
+ "kind": "lineBreak"
+ },
+ {
+ "text": "import",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "baz",
+ "kind": "aliasName"
+ }
+ ],
+ "contextSpan": {
+ "start": 27,
+ "length": 22
+ }
+ },
+ "references": [
+ {
+ "textSpan": {
+ "start": 34,
+ "length": 3
+ },
+ "fileName": "/e.ts",
+ "contextSpan": {
+ "start": 27,
+ "length": 22
+ },
+ "isWriteAccess": true,
+ "isDefinition": true
+ },
+ {
+ "textSpan": {
+ "start": 120,
+ "length": 3
+ },
+ "fileName": "/e.ts",
+ "isWriteAccess": false,
+ "isDefinition": false
+ }
+ ]
+ },
+ {
+ "definition": {
+ "containerKind": "",
+ "containerName": "",
+ "fileName": "/e.ts",
+ "kind": "alias",
+ "name": "(alias) function bang(): void\nimport bang",
+ "textSpan": {
+ "start": 70,
+ "length": 4
+ },
+ "displayParts": [
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": "alias",
+ "kind": "text"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "function",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "bang",
+ "kind": "aliasName"
+ },
+ {
+ "text": "(",
+ "kind": "punctuation"
+ },
+ {
+ "text": ")",
+ "kind": "punctuation"
+ },
+ {
+ "text": ":",
+ "kind": "punctuation"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "void",
+ "kind": "keyword"
+ },
+ {
+ "text": "\n",
+ "kind": "lineBreak"
+ },
+ {
+ "text": "import",
+ "kind": "keyword"
+ },
+ {
+ "text": " ",
+ "kind": "space"
+ },
+ {
+ "text": "bang",
+ "kind": "aliasName"
+ }
+ ],
+ "contextSpan": {
+ "start": 50,
+ "length": 38
+ }
+ },
+ "references": [
+ {
+ "textSpan": {
+ "start": 70,
+ "length": 4
+ },
+ "fileName": "/e.ts",
+ "contextSpan": {
+ "start": 50,
+ "length": 38
+ },
+ "isWriteAccess": true,
+ "isDefinition": true
+ },
+ {
+ "textSpan": {
+ "start": 127,
+ "length": 4
+ },
+ "fileName": "/e.ts",
+ "isWriteAccess": false,
+ "isDefinition": false
+ }
+ ]
+ }
+]
// === /a.ts ===
// export function [|foo|](): void {}
+// === /b.ts ===
+// export { [|foo|] as [|bar|] } from "./a";
+
+// === /c.ts ===
+// export { /*FIND ALL REFS*/[|foo|] as [|default|] } from "./a";
+
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
+// === /e.ts ===
+// import { [|bar|] } from "./b";
+// import [|baz|] from "./c";
+// import { [|default|] as [|bang|] } from "./c";
+// import [|boom|] from "./d";
+// [|bar|](); [|baz|](); [|bang|](); [|boom|]();
+
[
{
"definition": {
@@ -1697,853 +2546,7 @@
]
// === /b.ts ===
-// export { [|foo|] as [|bar|] } from "./a";
-
-// === /c.ts ===
-// export { /*FIND ALL REFS*/[|foo|] as [|default|] } from "./a";
-
-// === /e.ts ===
-// import { [|bar|] } from "./b";
-// import [|baz|] from "./c";
-// import { [|default|] as [|bang|] } from "./c";
-// import [|boom|] from "./d";
-// [|bar|](); [|baz|](); [|bang|](); [|boom|]();
-
-// === /d.ts ===
-// export { [|default|] } from "./c";
-
-// === /a.ts ===
-// export function [|foo|](): void {}
-
-[
- {
- "definition": {
- "containerKind": "",
- "containerName": "",
- "fileName": "/a.ts",
- "kind": "function",
- "name": "function foo(): void",
- "textSpan": {
- "start": 16,
- "length": 3
- },
- "displayParts": [
- {
- "text": "function",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "foo",
- "kind": "functionName"
- },
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": ":",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "void",
- "kind": "keyword"
- }
- ],
- "contextSpan": {
- "start": 0,
- "length": 30
- }
- },
- "references": [
- {
- "textSpan": {
- "start": 16,
- "length": 3
- },
- "fileName": "/a.ts",
- "contextSpan": {
- "start": 0,
- "length": 30
- },
- "isWriteAccess": true,
- "isDefinition": true
- },
- {
- "textSpan": {
- "start": 9,
- "length": 3
- },
- "fileName": "/b.ts",
- "contextSpan": {
- "start": 0,
- "length": 33
- },
- "isWriteAccess": false,
- "isDefinition": false
- },
- {
- "textSpan": {
- "start": 9,
- "length": 3
- },
- "fileName": "/c.ts",
- "contextSpan": {
- "start": 0,
- "length": 37
- },
- "isWriteAccess": false,
- "isDefinition": false
- }
- ]
- },
- {
- "definition": {
- "containerKind": "",
- "containerName": "",
- "fileName": "/b.ts",
- "kind": "alias",
- "name": "(alias) function bar(): void\nexport bar",
- "textSpan": {
- "start": 16,
- "length": 3
- },
- "displayParts": [
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": "alias",
- "kind": "text"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "function",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "bar",
- "kind": "aliasName"
- },
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": ":",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "void",
- "kind": "keyword"
- },
- {
- "text": "\n",
- "kind": "lineBreak"
- },
- {
- "text": "export",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "bar",
- "kind": "aliasName"
- }
- ],
- "contextSpan": {
- "start": 0,
- "length": 33
- }
- },
- "references": [
- {
- "textSpan": {
- "start": 16,
- "length": 3
- },
- "fileName": "/b.ts",
- "contextSpan": {
- "start": 0,
- "length": 33
- },
- "isWriteAccess": true,
- "isDefinition": true
- }
- ]
- },
- {
- "definition": {
- "containerKind": "",
- "containerName": "",
- "fileName": "/e.ts",
- "kind": "alias",
- "name": "(alias) function bar(): void\nimport bar",
- "textSpan": {
- "start": 9,
- "length": 3
- },
- "displayParts": [
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": "alias",
- "kind": "text"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "function",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "bar",
- "kind": "aliasName"
- },
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": ":",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "void",
- "kind": "keyword"
- },
- {
- "text": "\n",
- "kind": "lineBreak"
- },
- {
- "text": "import",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "bar",
- "kind": "aliasName"
- }
- ],
- "contextSpan": {
- "start": 0,
- "length": 26
- }
- },
- "references": [
- {
- "textSpan": {
- "start": 9,
- "length": 3
- },
- "fileName": "/e.ts",
- "contextSpan": {
- "start": 0,
- "length": 26
- },
- "isWriteAccess": true,
- "isDefinition": true
- },
- {
- "textSpan": {
- "start": 113,
- "length": 3
- },
- "fileName": "/e.ts",
- "isWriteAccess": false,
- "isDefinition": false
- }
- ]
- },
- {
- "definition": {
- "containerKind": "",
- "containerName": "",
- "fileName": "/c.ts",
- "kind": "alias",
- "name": "(alias) function foo(): void\nexport default",
- "textSpan": {
- "start": 16,
- "length": 7
- },
- "displayParts": [
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": "alias",
- "kind": "text"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "function",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "foo",
- "kind": "functionName"
- },
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": ":",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "void",
- "kind": "keyword"
- },
- {
- "text": "\n",
- "kind": "lineBreak"
- },
- {
- "text": "export",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "default",
- "kind": "aliasName"
- }
- ],
- "contextSpan": {
- "start": 0,
- "length": 37
- }
- },
- "references": [
- {
- "textSpan": {
- "start": 16,
- "length": 7
- },
- "fileName": "/c.ts",
- "contextSpan": {
- "start": 0,
- "length": 37
- },
- "isWriteAccess": true,
- "isDefinition": true
- },
- {
- "textSpan": {
- "start": 59,
- "length": 7
- },
- "fileName": "/e.ts",
- "contextSpan": {
- "start": 50,
- "length": 38
- },
- "isWriteAccess": false,
- "isDefinition": false
- }
- ]
- },
- {
- "definition": {
- "containerKind": "",
- "containerName": "",
- "fileName": "/d.ts",
- "kind": "alias",
- "name": "(alias) function foo(): void\nexport default",
- "textSpan": {
- "start": 9,
- "length": 7
- },
- "displayParts": [
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": "alias",
- "kind": "text"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "function",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "foo",
- "kind": "functionName"
- },
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": ":",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "void",
- "kind": "keyword"
- },
- {
- "text": "\n",
- "kind": "lineBreak"
- },
- {
- "text": "export",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "default",
- "kind": "aliasName"
- }
- ],
- "contextSpan": {
- "start": 0,
- "length": 30
- }
- },
- "references": [
- {
- "textSpan": {
- "start": 9,
- "length": 7
- },
- "fileName": "/d.ts",
- "contextSpan": {
- "start": 0,
- "length": 30
- },
- "isWriteAccess": true,
- "isDefinition": true
- }
- ]
- },
- {
- "definition": {
- "containerKind": "",
- "containerName": "",
- "fileName": "/e.ts",
- "kind": "alias",
- "name": "(alias) function boom(): void\nimport boom",
- "textSpan": {
- "start": 96,
- "length": 4
- },
- "displayParts": [
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": "alias",
- "kind": "text"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "function",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "boom",
- "kind": "aliasName"
- },
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": ":",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "void",
- "kind": "keyword"
- },
- {
- "text": "\n",
- "kind": "lineBreak"
- },
- {
- "text": "import",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "boom",
- "kind": "aliasName"
- }
- ],
- "contextSpan": {
- "start": 89,
- "length": 23
- }
- },
- "references": [
- {
- "textSpan": {
- "start": 96,
- "length": 4
- },
- "fileName": "/e.ts",
- "contextSpan": {
- "start": 89,
- "length": 23
- },
- "isWriteAccess": true,
- "isDefinition": true
- },
- {
- "textSpan": {
- "start": 135,
- "length": 4
- },
- "fileName": "/e.ts",
- "isWriteAccess": false,
- "isDefinition": false
- }
- ]
- },
- {
- "definition": {
- "containerKind": "",
- "containerName": "",
- "fileName": "/e.ts",
- "kind": "alias",
- "name": "(alias) function baz(): void\nimport baz",
- "textSpan": {
- "start": 34,
- "length": 3
- },
- "displayParts": [
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": "alias",
- "kind": "text"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "function",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "baz",
- "kind": "aliasName"
- },
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": ":",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "void",
- "kind": "keyword"
- },
- {
- "text": "\n",
- "kind": "lineBreak"
- },
- {
- "text": "import",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "baz",
- "kind": "aliasName"
- }
- ],
- "contextSpan": {
- "start": 27,
- "length": 22
- }
- },
- "references": [
- {
- "textSpan": {
- "start": 34,
- "length": 3
- },
- "fileName": "/e.ts",
- "contextSpan": {
- "start": 27,
- "length": 22
- },
- "isWriteAccess": true,
- "isDefinition": true
- },
- {
- "textSpan": {
- "start": 120,
- "length": 3
- },
- "fileName": "/e.ts",
- "isWriteAccess": false,
- "isDefinition": false
- }
- ]
- },
- {
- "definition": {
- "containerKind": "",
- "containerName": "",
- "fileName": "/e.ts",
- "kind": "alias",
- "name": "(alias) function bang(): void\nimport bang",
- "textSpan": {
- "start": 70,
- "length": 4
- },
- "displayParts": [
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": "alias",
- "kind": "text"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "function",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "bang",
- "kind": "aliasName"
- },
- {
- "text": "(",
- "kind": "punctuation"
- },
- {
- "text": ")",
- "kind": "punctuation"
- },
- {
- "text": ":",
- "kind": "punctuation"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "void",
- "kind": "keyword"
- },
- {
- "text": "\n",
- "kind": "lineBreak"
- },
- {
- "text": "import",
- "kind": "keyword"
- },
- {
- "text": " ",
- "kind": "space"
- },
- {
- "text": "bang",
- "kind": "aliasName"
- }
- ],
- "contextSpan": {
- "start": 50,
- "length": 38
- }
- },
- "references": [
- {
- "textSpan": {
- "start": 70,
- "length": 4
- },
- "fileName": "/e.ts",
- "contextSpan": {
- "start": 50,
- "length": 38
- },
- "isWriteAccess": true,
- "isDefinition": true
- },
- {
- "textSpan": {
- "start": 127,
- "length": 4
- },
- "fileName": "/e.ts",
- "isWriteAccess": false,
- "isDefinition": false
- }
- ]
- }
-]
+// export { foo as /*FIND ALL REFS*/[|bar|] } from "./a";
// === /e.ts ===
// import { [|bar|] } from "./b";
@@ -2552,9 +2555,6 @@
// import boom from "./d";
// [|bar|](); baz(); bang(); boom();
-// === /b.ts ===
-// export { foo as /*FIND ALL REFS*/[|bar|] } from "./a";
-
[
{
"definition": {
@@ -2763,6 +2763,9 @@
}
]
+// === /b.ts ===
+// export { foo as [|bar|] } from "./a";
+
// === /e.ts ===
// import { /*FIND ALL REFS*/[|bar|] } from "./b";
// import baz from "./c";
@@ -2770,9 +2773,6 @@
// import boom from "./d";
// [|bar|](); baz(); bang(); boom();
-// === /b.ts ===
-// export { foo as [|bar|] } from "./a";
-
[
{
"definition": {
@@ -2981,6 +2981,9 @@
}
]
+// === /b.ts ===
+// export { foo as [|bar|] } from "./a";
+
// === /e.ts ===
// import { [|bar|] } from "./b";
// import baz from "./c";
@@ -2988,9 +2991,6 @@
// import boom from "./d";
// /*FIND ALL REFS*/[|bar|](); baz(); bang(); boom();
-// === /b.ts ===
-// export { foo as [|bar|] } from "./a";
-
[
{
"definition": {
@@ -3199,12 +3199,12 @@
}
]
-// === /d.ts ===
-// export { [|default|] } from "./c";
-
// === /c.ts ===
// export { foo as /*FIND ALL REFS*/[|default|] } from "./a";
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
// === /e.ts ===
// import { bar } from "./b";
// import [|baz|] from "./c";
@@ -3745,12 +3745,12 @@
}
]
-// === /d.ts ===
-// export { [|default|] } from "./c";
-
// === /c.ts ===
// export { foo as [|default|] } from "./a";
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
// === /e.ts ===
// import { bar } from "./b";
// import [|baz|] from "./c";
@@ -4291,8 +4291,8 @@
}
]
-// === /d.ts ===
-// export { /*FIND ALL REFS*/[|default|] } from "./c";
+// === /a.ts ===
+// export function [|foo|](): void {}
// === /b.ts ===
// export { [|foo|] as [|bar|] } from "./a";
@@ -4300,6 +4300,9 @@
// === /c.ts ===
// export { [|foo|] as [|default|] } from "./a";
+// === /d.ts ===
+// export { /*FIND ALL REFS*/[|default|] } from "./c";
+
// === /e.ts ===
// import { [|bar|] } from "./b";
// import [|baz|] from "./c";
@@ -4307,9 +4310,6 @@
// import [|boom|] from "./d";
// [|bar|](); [|baz|](); [|bang|](); [|boom|]();
-// === /a.ts ===
-// export function [|foo|](): void {}
-
[
{
"definition": {
@@ -5140,12 +5140,12 @@
}
]
-// === /d.ts ===
-// export { [|default|] } from "./c";
-
// === /c.ts ===
// export { foo as [|default|] } from "./a";
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
// === /e.ts ===
// import { bar } from "./b";
// import /*FIND ALL REFS*/[|baz|] from "./c";
@@ -5686,12 +5686,12 @@
}
]
-// === /d.ts ===
-// export { [|default|] } from "./c";
-
// === /c.ts ===
// export { foo as [|default|] } from "./a";
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
// === /e.ts ===
// import { bar } from "./b";
// import [|baz|] from "./c";
@@ -6466,8 +6466,8 @@
}
]
-// === /d.ts ===
-// export { [|default|] } from "./c";
+// === /a.ts ===
+// export function [|foo|](): void {}
// === /b.ts ===
// export { [|foo|] as [|bar|] } from "./a";
@@ -6475,6 +6475,9 @@
// === /c.ts ===
// export { [|foo|] as [|default|] } from "./a";
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
// === /e.ts ===
// import { [|bar|] } from "./b";
// import [|baz|] from "./c";
@@ -6482,9 +6485,6 @@
// import /*FIND ALL REFS*/[|boom|] from "./d";
// [|bar|](); [|baz|](); [|bang|](); [|boom|]();
-// === /a.ts ===
-// export function [|foo|](): void {}
-
[
{
"definition": {
@@ -7315,8 +7315,8 @@
}
]
-// === /d.ts ===
-// export { [|default|] } from "./c";
+// === /a.ts ===
+// export function [|foo|](): void {}
// === /b.ts ===
// export { [|foo|] as [|bar|] } from "./a";
@@ -7324,6 +7324,9 @@
// === /c.ts ===
// export { [|foo|] as [|default|] } from "./a";
+// === /d.ts ===
+// export { [|default|] } from "./c";
+
// === /e.ts ===
// import { [|bar|] } from "./b";
// import [|baz|] from "./c";
@@ -7331,9 +7334,6 @@
// import [|boom|] from "./d";
// [|bar|](); [|baz|](); [|bang|](); /*FIND ALL REFS*/[|boom|]();
-// === /a.ts ===
-// export function [|foo|](): void {}
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsReExports2.baseline.jsonc b/tests/baselines/reference/findAllRefsReExports2.baseline.jsonc
index 39c39a886b0..1c5f38bd70f 100644
--- a/tests/baselines/reference/findAllRefsReExports2.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsReExports2.baseline.jsonc
@@ -1,9 +1,9 @@
-// === /b.ts ===
-// import { [|foo|] as [|oof|] } from "./a";
-
// === /a.ts ===
// export function /*FIND ALL REFS*/[|foo|](): void {}
+// === /b.ts ===
+// import { [|foo|] as [|oof|] } from "./a";
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsReExportsUseInImportType.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportsUseInImportType.baseline.jsonc
index c275bea6c7d..bd1d6a1bdd2 100644
--- a/tests/baselines/reference/findAllRefsReExportsUseInImportType.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsReExportsUseInImportType.baseline.jsonc
@@ -1,12 +1,12 @@
-// === /foo/types/types.ts ===
-// export type /*FIND ALL REFS*/[|Full|] = { prop: string; };
-
// === /app.ts ===
// import { foo } from './foo/types';
// export type fullType = foo.[|Full|];
// type namespaceImport = typeof import('./foo/types');
// type fullType2 = import('./foo/types').foo.[|Full|];
+// === /foo/types/types.ts ===
+// export type /*FIND ALL REFS*/[|Full|] = { prop: string; };
+
[
{
"definition": {
@@ -126,15 +126,15 @@
}
]
-// === /foo/types/types.ts ===
-// export type [|Full|] = { prop: string; };
-
// === /app.ts ===
// import { foo } from './foo/types';
// export type fullType = foo./*FIND ALL REFS*/[|Full|];
// type namespaceImport = typeof import('./foo/types');
// type fullType2 = import('./foo/types').foo.[|Full|];
+// === /foo/types/types.ts ===
+// export type [|Full|] = { prop: string; };
+
[
{
"definition": {
@@ -254,15 +254,15 @@
}
]
-// === /foo/types/types.ts ===
-// export type [|Full|] = { prop: string; };
-
// === /app.ts ===
// import { foo } from './foo/types';
// export type fullType = foo.[|Full|];
// type namespaceImport = typeof import('./foo/types');
// type fullType2 = import('./foo/types').foo./*FIND ALL REFS*/[|Full|];
+// === /foo/types/types.ts ===
+// export type [|Full|] = { prop: string; };
+
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefsRenameImportWithSameName.baseline.jsonc b/tests/baselines/reference/findAllRefsRenameImportWithSameName.baseline.jsonc
index d31be8a14b0..70a2162cf4f 100644
--- a/tests/baselines/reference/findAllRefsRenameImportWithSameName.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsRenameImportWithSameName.baseline.jsonc
@@ -1,10 +1,10 @@
+// === /a.ts ===
+// export const /*FIND ALL REFS*/[|x|] = 0;
+
// === /b.ts ===
// import { [|x|] as [|x|] } from "./a";
// [|x|];
-// === /a.ts ===
-// export const /*FIND ALL REFS*/[|x|] = 0;
-
[
{
"definition": {
@@ -178,13 +178,13 @@
}
]
+// === /a.ts ===
+// export const [|x|] = 0;
+
// === /b.ts ===
// import { /*FIND ALL REFS*/[|x|] as [|x|] } from "./a";
// [|x|];
-// === /a.ts ===
-// export const [|x|] = 0;
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findAllRefs_importType_js.1.baseline.jsonc b/tests/baselines/reference/findAllRefs_importType_js.1.baseline.jsonc
index 072f0ac1ab9..178f3b7e8e4 100644
--- a/tests/baselines/reference/findAllRefs_importType_js.1.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefs_importType_js.1.baseline.jsonc
@@ -1,13 +1,13 @@
+// === /a.js ===
+// module.exports = class /*FIND ALL REFS*/[|C|] {};
+// module.exports.D = class D {};
+
// === /b.js ===
// /** @type {import("[|./a|]")} */
// const x = 0;
// /** @type {import("./a").D} */
// const y = 0;
-// === /a.js ===
-// module.exports = class /*FIND ALL REFS*/[|C|] {};
-// module.exports.D = class D {};
-
[
{
"definition": {
diff --git a/tests/baselines/reference/findReferencesJSXTagName.baseline.jsonc b/tests/baselines/reference/findReferencesJSXTagName.baseline.jsonc
index d692212cc70..1646c2ea306 100644
--- a/tests/baselines/reference/findReferencesJSXTagName.baseline.jsonc
+++ b/tests/baselines/reference/findReferencesJSXTagName.baseline.jsonc
@@ -1,3 +1,7 @@
+// === /tests/cases/fourslash/RedditSubmission.ts ===
+// export const [|SubmissionComp|] = (submission: SubmissionProps) =>
+//
;
+
// === /tests/cases/fourslash/index.tsx ===
// import { /*FIND ALL REFS*/[|SubmissionComp|] } from "./RedditSubmission"
// function displaySubreddit(subreddit: string) {
@@ -5,10 +9,6 @@
// .map((value, index) => <[|SubmissionComp|] key={ index } elementPosition= { index } {...value.data} />);
// }
-// === /tests/cases/fourslash/RedditSubmission.ts ===
-// export const [|SubmissionComp|] = (submission: SubmissionProps) =>
-// ;
-
[
{
"definition": {
@@ -245,6 +245,10 @@
}
]
+// === /tests/cases/fourslash/RedditSubmission.ts ===
+// export const /*FIND ALL REFS*/[|SubmissionComp|] = (submission: SubmissionProps) =>
+// ;
+
// === /tests/cases/fourslash/index.tsx ===
// import { [|SubmissionComp|] } from "./RedditSubmission"
// function displaySubreddit(subreddit: string) {
@@ -252,10 +256,6 @@
// .map((value, index) => <[|SubmissionComp|] key={ index } elementPosition= { index } {...value.data} />);
// }
-// === /tests/cases/fourslash/RedditSubmission.ts ===
-// export const /*FIND ALL REFS*/[|SubmissionComp|] = (submission: SubmissionProps) =>
-// ;
-
[
{
"definition": {
diff --git a/tests/baselines/reference/getOccurrencesIsDefinitionOfExport.baseline.jsonc b/tests/baselines/reference/getOccurrencesIsDefinitionOfExport.baseline.jsonc
index cf91ce97c90..60452dd8bf6 100644
--- a/tests/baselines/reference/getOccurrencesIsDefinitionOfExport.baseline.jsonc
+++ b/tests/baselines/reference/getOccurrencesIsDefinitionOfExport.baseline.jsonc
@@ -1,10 +1,10 @@
+// === /tests/cases/fourslash/m.ts ===
+// export var /*FIND ALL REFS*/[|x|] = 12;
+
// === /tests/cases/fourslash/main.ts ===
// import { [|x|] } from "./m";
// const y = [|x|];
-// === /tests/cases/fourslash/m.ts ===
-// export var /*FIND ALL REFS*/[|x|] = 12;
-
[
{
"definition": {
@@ -165,13 +165,13 @@
}
]
+// === /tests/cases/fourslash/m.ts ===
+// export var [|x|] = 12;
+
// === /tests/cases/fourslash/main.ts ===
// import { /*FIND ALL REFS*/[|x|] } from "./m";
// const y = [|x|];
-// === /tests/cases/fourslash/m.ts ===
-// export var [|x|] = 12;
-
[
{
"definition": {
diff --git a/tests/baselines/reference/indirectJsRequireRename.baseline.jsonc b/tests/baselines/reference/indirectJsRequireRename.baseline.jsonc
index 50cf3e98ee7..e52e9cff2fa 100644
--- a/tests/baselines/reference/indirectJsRequireRename.baseline.jsonc
+++ b/tests/baselines/reference/indirectJsRequireRename.baseline.jsonc
@@ -1,11 +1,11 @@
-// === /lib/plugins/aws/package/compile/events/httpApi/index.js ===
-// const { [|logWarning|] } = require('../../../../../../classes/Error');
+// === /bin/serverless.js ===
+// require('../lib/classes/Error').[|log/*FIND ALL REFS*/Warning|](`CLI triage crashed with: ${error.stack}`);
// === /lib/classes/Error.js ===
// module.exports.[|logWarning|] = message => { };
-// === /bin/serverless.js ===
-// require('../lib/classes/Error').[|log/*FIND ALL REFS*/Warning|](`CLI triage crashed with: ${error.stack}`);
+// === /lib/plugins/aws/package/compile/events/httpApi/index.js ===
+// const { [|logWarning|] } = require('../../../../../../classes/Error');
[
{
diff --git a/tests/baselines/reference/renameImportAndExportInDiffFiles.baseline.jsonc b/tests/baselines/reference/renameImportAndExportInDiffFiles.baseline.jsonc
index 7d9db4a248b..4ad900c6877 100644
--- a/tests/baselines/reference/renameImportAndExportInDiffFiles.baseline.jsonc
+++ b/tests/baselines/reference/renameImportAndExportInDiffFiles.baseline.jsonc
@@ -1,10 +1,10 @@
+// === /tests/cases/fourslash/a.ts ===
+// export var /*FIND ALL REFS*/[|a|];
+
// === /tests/cases/fourslash/b.ts ===
// import { [|a|] } from './a';
// export { [|a|] };
-// === /tests/cases/fourslash/a.ts ===
-// export var /*FIND ALL REFS*/[|a|];
-
[
{
"definition": {
@@ -169,13 +169,13 @@
}
]
+// === /tests/cases/fourslash/a.ts ===
+// export var [|a|];
+
// === /tests/cases/fourslash/b.ts ===
// import { /*FIND ALL REFS*/[|a|] } from './a';
// export { [|a|] };
-// === /tests/cases/fourslash/a.ts ===
-// export var [|a|];
-
[
{
"definition": {
@@ -340,13 +340,13 @@
}
]
+// === /tests/cases/fourslash/a.ts ===
+// export var [|a|];
+
// === /tests/cases/fourslash/b.ts ===
// import { [|a|] } from './a';
// export { /*FIND ALL REFS*/[|a|] };
-// === /tests/cases/fourslash/a.ts ===
-// export var [|a|];
-
[
{
"definition": {
diff --git a/tests/baselines/reference/renameJsExports02.baseline.jsonc b/tests/baselines/reference/renameJsExports02.baseline.jsonc
index d0b2d0cc3ef..42f0dbfd8f2 100644
--- a/tests/baselines/reference/renameJsExports02.baseline.jsonc
+++ b/tests/baselines/reference/renameJsExports02.baseline.jsonc
@@ -1,9 +1,9 @@
-// === /tests/cases/fourslash/b.js ===
-// const [|A|] = require("./a");
-
// === /tests/cases/fourslash/a.js ===
// module.exports = class /*FIND ALL REFS*/[|A|] {}
+// === /tests/cases/fourslash/b.js ===
+// const [|A|] = require("./a");
+
[
{
"definition": {
diff --git a/tests/baselines/reference/transitiveExportImports2.baseline.jsonc b/tests/baselines/reference/transitiveExportImports2.baseline.jsonc
index c0723784c3e..0ec8bb03bc0 100644
--- a/tests/baselines/reference/transitiveExportImports2.baseline.jsonc
+++ b/tests/baselines/reference/transitiveExportImports2.baseline.jsonc
@@ -1,6 +1,3 @@
-// === /tests/cases/fourslash/c.ts ===
-// import { [|B|] } from "./b";
-
// === /tests/cases/fourslash/a.ts ===
// namespace /*FIND ALL REFS*/[|A|] {
// export const x = 0;
@@ -10,6 +7,9 @@
// export import [|B|] = [|A|];
// [|B|].x;
+// === /tests/cases/fourslash/c.ts ===
+// import { [|B|] } from "./b";
+
[
{
"definition": {
@@ -249,13 +249,13 @@
}
]
-// === /tests/cases/fourslash/c.ts ===
-// import { [|B|] } from "./b";
-
// === /tests/cases/fourslash/b.ts ===
// export import /*FIND ALL REFS*/[|B|] = A;
// [|B|].x;
+// === /tests/cases/fourslash/c.ts ===
+// import { [|B|] } from "./b";
+
[
{
"definition": {
@@ -440,13 +440,13 @@
}
]
-// === /tests/cases/fourslash/c.ts ===
-// import { /*FIND ALL REFS*/[|B|] } from "./b";
-
// === /tests/cases/fourslash/b.ts ===
// export import [|B|] = A;
// [|B|].x;
+// === /tests/cases/fourslash/c.ts ===
+// import { /*FIND ALL REFS*/[|B|] } from "./b";
+
[
{
"definition": {
diff --git a/tests/baselines/reference/transitiveExportImports3.baseline.jsonc b/tests/baselines/reference/transitiveExportImports3.baseline.jsonc
index e8d4e19a1be..1e3b48b1890 100644
--- a/tests/baselines/reference/transitiveExportImports3.baseline.jsonc
+++ b/tests/baselines/reference/transitiveExportImports3.baseline.jsonc
@@ -1,11 +1,11 @@
+// === /tests/cases/fourslash/a.ts ===
+// export function /*FIND ALL REFS*/[|f|]() {}
+
// === /tests/cases/fourslash/b.ts ===
// export { [|f|] as [|g|] } from "./a";
// import { [|f|] } from "./a";
// import { [|g|] } from "./b";
-// === /tests/cases/fourslash/a.ts ===
-// export function /*FIND ALL REFS*/[|f|]() {}
-
[
{
"definition": {
@@ -790,14 +790,14 @@
}
]
+// === /tests/cases/fourslash/a.ts ===
+// export function [|f|]() {}
+
// === /tests/cases/fourslash/b.ts ===
// export { [|f|] as [|g|] } from "./a";
// import { /*FIND ALL REFS*/[|f|] } from "./a";
// import { [|g|] } from "./b";
-// === /tests/cases/fourslash/a.ts ===
-// export function [|f|]() {}
-
[
{
"definition": {