File: findAllRefsRootSymbols.ts

package info (click to toggle)
node-typescript 4.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 396,552 kB
  • sloc: javascript: 1,444,377; makefile: 7; sh: 3
file content (16 lines) | stat: -rw-r--r-- 867 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// <reference path="fourslash.ts" />

////interface I { [|[|{| "isDefinition": true, "contextRangeIndex": 0 |}x|]: {};|] }
////interface J { [|[|{| "isDefinition": true, "contextRangeIndex": 2 |}x|]: {};|] }
////declare const o: (I | J) & { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}x|]: string|] };
////o.[|x|];

const [r0Def, r0, r1Def, r1, r2Def, r2, r3] = test.ranges();
const i = { definition: "(property) I.x: {}", ranges: [r0] };
const j = { definition: "(property) J.x: {}", ranges: [r1] };
const anon = { definition: "(property) x: string", ranges: [r2] };
const intersect = { definition: "(property) x: {} & string", ranges: [r3] };
verify.referenceGroups(r0, [i, intersect]);
verify.referenceGroups(r1, [j, intersect]);
verify.referenceGroups(r2, [anon, intersect]);
verify.referenceGroups(r3, [i, j, anon, intersect]);