TypeScript/tests/cases/fourslash/findAllRefsParameterPropertyDeclaration2.ts

16 lines
591 B
TypeScript
Raw Normal View History

2015-12-13 00:52:55 +01:00
/// <reference path='fourslash.ts'/>
//// class Foo {
2019-06-13 21:25:02 +02:00
//// constructor([|public [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}publicParam|]: number|]) {
2015-12-17 01:06:55 +01:00
//// let localPublic = [|publicParam|];
//// this.[|{| "isWriteAccess": true |}publicParam|] += 10;
2015-12-13 00:52:55 +01:00
//// }
//// }
2019-06-05 21:38:15 +02:00
const [rDef, ...ranges] = test.ranges();
const [r0, r1, r2] = ranges;
verify.referenceGroups(ranges, [
{ definition: "(property) Foo.publicParam: number", ranges: [r0, r2] },
{ definition: "(parameter) publicParam: number", ranges: [r1] }
]);