TypeScript/tests/cases/fourslash/findAllRefsForComputedProperties.ts
Andy Hanson 8515f7e2b5 Change find-all-references tests to test for groups
* Also always test for isWriteAccess and isDefinition
2017-01-31 06:59:16 -08:00

27 lines
843 B
TypeScript

/// <reference path='fourslash.ts'/>
////interface I {
//// ["[|{| "isDefinition": true |}prop1|]"]: () => void;
////}
////
////class C implements I {
//// ["[|{| "isDefinition": true |}prop1|]"]: any;
////}
////
////var x: I = {
//// ["[|{| "isDefinition": true |}prop1|]"]: function () { },
////}
const ranges = test.ranges();
const [r0, r1, r2] = ranges;
verify.referenceGroups(r0, [{ definition: '(property) I[["prop1"]]: () => void', ranges }]);
verify.referenceGroups(r1, [
{ definition: '(property) I[["prop1"]]: () => void', ranges: [r0, r2] },
{ definition: '(property) C[["prop1"]]: any', ranges: [r1] }
]);
verify.referenceGroups(r2, [
{ definition: '(property) I[["prop1"]]: () => void', ranges: [r0, r1] },
{ definition: '(property) ["prop1"]: () => void', ranges: [r2] }
]);