2017-12-11 01:58:17 +01:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
2019-06-13 21:25:02 +02:00
|
|
|
////interface I { [|[|{| "isDefinition": true, "contextRangeIndex": 0 |}x|]: {};|] }
|
|
|
|
////interface J { [|[|{| "isDefinition": true, "contextRangeIndex": 2 |}x|]: {};|] }
|
|
|
|
////declare const o: (I | J) & { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}x|]: string|] };
|
2017-12-11 01:58:17 +01:00
|
|
|
////o.[|x|];
|
|
|
|
|
2019-06-05 21:38:15 +02:00
|
|
|
const [r0Def, r0, r1Def, r1, r2Def, r2, r3] = test.ranges();
|
2018-03-19 19:58:20 +01:00
|
|
|
const i = { definition: "(property) I.x: {}", ranges: [r0] };
|
|
|
|
const j = { definition: "(property) J.x: {}", ranges: [r1] };
|
|
|
|
const anon = { definition: "(property) x: string", ranges: [r2] };
|
2018-11-08 18:02:04 +01:00
|
|
|
const intersect = { definition: "(property) x: {} & string", ranges: [r3] };
|
2018-03-19 19:58:20 +01:00
|
|
|
verify.referenceGroups(r0, [i, intersect]);
|
|
|
|
verify.referenceGroups(r1, [j, intersect]);
|
|
|
|
verify.referenceGroups(r2, [anon, intersect]);
|
|
|
|
verify.referenceGroups(r3, [i, j, anon, intersect]);
|