2017-08-09 23:39:06 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
// @noImplicitReferences: true
|
|
|
|
|
|
|
|
// @Filename: /node_modules/a/index.d.ts
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|import [|{| "name": "useAX", "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}X|] from "x";|]
|
2017-08-09 23:39:06 +02:00
|
|
|
////export function a(x: [|X|]): void;
|
|
|
|
|
|
|
|
// @Filename: /node_modules/a/node_modules/x/index.d.ts
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|export default class /*defAX*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 3 |}X|] {
|
2017-08-09 23:39:06 +02:00
|
|
|
//// private x: number;
|
2019-06-06 18:49:31 +02:00
|
|
|
////}|]
|
2017-08-09 23:39:06 +02:00
|
|
|
|
|
|
|
// @Filename: /node_modules/a/node_modules/x/package.json
|
|
|
|
////{ "name": "x", "version": "1.2.3" }
|
|
|
|
|
|
|
|
// @Filename: /node_modules/b/index.d.ts
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|import [|{| "name": "useBX", "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 5 |}X|] from "x";|]
|
2017-08-09 23:39:06 +02:00
|
|
|
////export const b: [|X|];
|
|
|
|
|
|
|
|
// @Filename: /node_modules/b/node_modules/x/index.d.ts
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|export default class /*defBX*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 8 |}X|] {
|
2017-08-09 23:39:06 +02:00
|
|
|
//// private x: number;
|
2019-06-06 18:49:31 +02:00
|
|
|
////}|]
|
2017-08-09 23:39:06 +02:00
|
|
|
|
|
|
|
// @Filename: /node_modules/b/node_modules/x/package.json
|
2018-04-11 23:07:22 +02:00
|
|
|
////{ "name": "x", "version": "1.2.3" }
|
2017-08-09 23:39:06 +02:00
|
|
|
|
|
|
|
// @Filename: /src/a.ts
|
|
|
|
////import { a } from "a";
|
|
|
|
////import { b } from "b";
|
|
|
|
////a(/*error*/b);
|
|
|
|
|
|
|
|
goTo.file("/src/a.ts");
|
|
|
|
verify.numberOfErrorsInCurrentFile(0);
|
|
|
|
verify.goToDefinition("useAX", "defAX");
|
|
|
|
verify.goToDefinition("useBX", "defAX");
|
|
|
|
|
2019-06-06 18:49:31 +02:00
|
|
|
const [r0Def, r0, r1, r2Def, r2, r3Def, r3, r4, r5Def, r5] = test.ranges();
|
2017-10-26 02:50:11 +02:00
|
|
|
const aImport = { definition: "(alias) class X\nimport X", ranges: [r0, r1] };
|
2017-08-09 23:39:06 +02:00
|
|
|
const def = { definition: "class X", ranges: [r2] };
|
2017-10-26 02:50:11 +02:00
|
|
|
const bImport = { definition: "(alias) class X\nimport X", ranges: [r3, r4] };
|
2017-08-09 23:39:06 +02:00
|
|
|
verify.referenceGroups([r0, r1], [aImport, def, bImport]);
|
2018-04-11 23:07:22 +02:00
|
|
|
verify.referenceGroups([r2, r5], [def, aImport, bImport]);
|
2017-08-09 23:39:06 +02:00
|
|
|
verify.referenceGroups([r3, r4], [bImport, def, aImport]);
|