2015-07-01 23:26:05 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
////interface I {
|
2019-06-13 21:25:02 +02:00
|
|
|
//// [|[|{| "isDefinition": true, "contextRangeIndex": 0 |}property1|]: number;|]
|
2015-07-01 23:26:05 +02:00
|
|
|
//// property2: string;
|
|
|
|
////}
|
|
|
|
////
|
2015-07-16 00:07:04 +02:00
|
|
|
////var elems: I[];
|
2019-06-13 21:25:02 +02:00
|
|
|
////for ([|let { [|{| "contextRangeIndex": 2 |}property1|]: p } of elems|]) {
|
2015-07-01 23:26:05 +02:00
|
|
|
////}
|
2019-06-13 21:25:02 +02:00
|
|
|
////for ([|let { [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}property1|] } of elems|]) {
|
2015-07-01 23:26:05 +02:00
|
|
|
////}
|
2019-06-13 21:25:02 +02:00
|
|
|
////for ([|var { [|{| "contextRangeIndex": 6 |}property1|]: p1 } of elems|]) {
|
2015-07-01 23:26:05 +02:00
|
|
|
////}
|
2015-07-16 00:07:04 +02:00
|
|
|
////var p2;
|
2019-06-13 21:25:02 +02:00
|
|
|
////for ([|{ [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 8 |}property1|] : p2 } of elems|]) {
|
2015-07-16 00:07:04 +02:00
|
|
|
////}
|
|
|
|
|
2019-06-06 00:01:34 +02:00
|
|
|
const [r0Def, r0, r1Def, r1, r2Def, r2, r3Def, r3, r4Def, r4] = test.ranges();
|
|
|
|
verify.referenceGroups([r0, r1, r3, r4], [{
|
|
|
|
definition: "(property) I.property1: number",
|
|
|
|
ranges: [r0, r1, r2, r3, r4]
|
|
|
|
}]);
|
2017-01-27 17:59:33 +01:00
|
|
|
verify.referenceGroups(r2, [
|
|
|
|
{ definition: "(property) I.property1: number", ranges: [r0, r1, r3, r4] },
|
|
|
|
{ definition: "let property1: number", ranges: [r2] }
|
|
|
|
]);
|