TypeScript/tests/cases/fourslash/referencesForStringLiteralPropertyNames4.ts

13 lines
531 B
TypeScript
Raw Normal View History

2015-03-02 23:41:44 +01:00
/// <reference path='fourslash.ts'/>
2019-06-13 21:25:02 +02:00
////var x = { [|"[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}someProperty|]": 0|] }
2015-03-02 23:41:44 +01:00
////x["[|someProperty|]"] = 3;
////x.[|{| "isWriteAccess": true |}someProperty|] = 5;
2015-03-02 23:41:44 +01:00
2019-06-03 23:13:47 +02:00
const [rDef, ...ranges] = test.ranges();
const [r0, r1, r2] = ranges;
verify.referenceGroups(r0, [{ definition: '(property) "someProperty": number', ranges }]);
verify.referenceGroups([r1, r2], [
{ definition: '(property) "someProperty": number', ranges: [r0, r1, r2] },
]);