TypeScript/tests/cases/fourslash/referencesForIndexProperty.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

17 lines
565 B
TypeScript

/// <reference path='fourslash.ts'/>
// References a class property using string index access
////class Foo {
//// [|{| "isWriteAccess": true, "isDefinition": true |}property|]: number;
//// [|{| "isWriteAccess": true, "isDefinition": true |}method|](): void { }
////}
////
////var f: Foo;
////f["[|property|]"];
////f["[|method|]"];
const ranges = test.rangesByText();
verify.singleReferenceGroup("(property) Foo.property: number", ranges.get("property"));
verify.singleReferenceGroup("(method) Foo.method(): void", ranges.get("method"));