• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/// <reference path="fourslash.ts"/>
2
3////module Shapes {
4////    export class Point {
5////        [|private originPointAtTheHorizon = 0.0;|]
6////
7////        [|get distanceFromOrigin(distanceParam): number {
8////            var [|distanceLocal|];
9////            return 0;
10////        }|]
11////    }
12////}
13////
14////var [|myPointThatIJustInitiated = new Shapes.Point()|];
15////[|interface IDistance{
16////    [|INITIATED123;|]
17////    [|public horizon(): void;|]
18////}|]
19
20const [r0, r1, r2, r3, r4, r5, r6] = test.ranges()
21const horizon: FourSlashInterface.ExpectedNavigateToItem =
22    { name: "horizon", kind: "method", kindModifiers: "public", range: r6, containerName: "IDistance", containerKind: "interface" };
23const origin: FourSlashInterface.ExpectedNavigateToItem =
24    { name: "originPointAtTheHorizon", kind: "property", kindModifiers: "private", range: r0, containerName: "Point", containerKind: "class" };
25
26verify.navigateTo(
27    {
28        pattern: "Horizon",
29        expected: [
30            { ...horizon, isCaseSensitive: false },
31            { ...origin, matchKind: "substring" },
32        ],
33    },
34    {
35        pattern: "horizon",
36        expected: [
37            horizon,
38            { ...origin, matchKind: "substring", isCaseSensitive: false },
39        ],
40    },
41    {
42        pattern: "Distance",
43        expected: [
44            { name: "distanceFromOrigin", matchKind: "prefix", isCaseSensitive: false, kind: "getter", range: r1, containerName: "Point", containerKind: "class" },
45            { name: "distanceLocal", matchKind: "prefix", isCaseSensitive: false, kind: "var", range: r2, containerName: "distanceFromOrigin", containerKind: "getter" },
46            { name: "IDistance", matchKind: "substring", kind: "interface", range: r4 },
47        ],
48    },
49    {
50        pattern: "INITIATED",
51        expected: [
52            { name: "INITIATED123", matchKind: "prefix", kind: "property", range: r5, containerName: "IDistance", containerKind: "interface" },
53        ],
54    },
55    {
56        pattern: "mPointThatIJustInitiated wrongKeyWord",
57        expected: [
58            { name: "myPointThatIJustInitiated", matchKind: "camelCase", kind: "var", range: r3 }
59        ],
60    },
61);
62