2018-05-11 00:31:06 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @Filename: /a.ts
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|type [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}T|] = number;|]
|
|
|
|
////[|[|{| "contextRangeIndex": 2 |}export|] = [|{| "contextRangeIndex": 2 |}T|];|]
|
2018-05-11 00:31:06 +02:00
|
|
|
|
|
|
|
// @Filename: /b.ts
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|import [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 5 |}T|] = require("[|{| "contextRangeIndex": 5 |}./a|]");|]
|
2018-05-11 00:31:06 +02:00
|
|
|
|
2019-06-06 18:09:39 +02:00
|
|
|
const [r0Def, r0, r12Def, r1, r2, r3Def, r3, r4] = test.ranges();
|
2018-11-09 18:38:45 +01:00
|
|
|
const mod = { definition: 'module "/a"', ranges: [r4, r1] };
|
|
|
|
const a = { definition: "type T = number", ranges: [r0, r2] };
|
|
|
|
const b = { definition: '(alias) type T = number\nimport T = require("./a")', ranges: [r3] };
|
|
|
|
verify.referenceGroups([r0, r2], [a, b]);
|
|
|
|
verify.referenceGroups(r3, [b, a]);
|
|
|
|
verify.referenceGroups(r4, [mod, a, b]);
|
2020-01-31 20:53:57 +01:00
|
|
|
verify.referenceGroups(r1, [a, b]);
|