File tree Expand file tree Collapse file tree 2 files changed +311
-0
lines changed
tests/baselines/reference Expand file tree Collapse file tree 2 files changed +311
-0
lines changed Original file line number Diff line number Diff line change 1+ // === /tests/cases/fourslash/findAllRefsOnDefinition-import.ts ===
2+ // export class Test{
3+ //
4+ // constructor(){
5+ //
6+ // }
7+ //
8+ // public /*FIND ALL REFS*/[|start|](){
9+ // return this;
10+ // }
11+ //
12+ // public stop(){
13+ // return this;
14+ // }
15+ // }
16+
17+ // === /tests/cases/fourslash/findAllRefsOnDefinition.ts ===
18+ // import Second = require("./findAllRefsOnDefinition-import");
19+ //
20+ // var second = new Second.Test()
21+ // second.[|start|]();
22+ // second.stop();
23+
24+ [
25+ {
26+ "definition" : {
27+ "containerKind" : " " ,
28+ "containerName" : " " ,
29+ "fileName" : " /tests/cases/fourslash/findAllRefsOnDefinition-import.ts" ,
30+ "kind" : " method" ,
31+ "name" : " (method) Test.start(): this" ,
32+ "textSpan" : {
33+ "start" : 58 ,
34+ "length" : 5
35+ },
36+ "displayParts" : [
37+ {
38+ "text" : " (" ,
39+ "kind" : " punctuation"
40+ },
41+ {
42+ "text" : " method" ,
43+ "kind" : " text"
44+ },
45+ {
46+ "text" : " )" ,
47+ "kind" : " punctuation"
48+ },
49+ {
50+ "text" : " " ,
51+ "kind" : " space"
52+ },
53+ {
54+ "text" : " Test" ,
55+ "kind" : " className"
56+ },
57+ {
58+ "text" : " ." ,
59+ "kind" : " punctuation"
60+ },
61+ {
62+ "text" : " start" ,
63+ "kind" : " methodName"
64+ },
65+ {
66+ "text" : " (" ,
67+ "kind" : " punctuation"
68+ },
69+ {
70+ "text" : " )" ,
71+ "kind" : " punctuation"
72+ },
73+ {
74+ "text" : " :" ,
75+ "kind" : " punctuation"
76+ },
77+ {
78+ "text" : " " ,
79+ "kind" : " space"
80+ },
81+ {
82+ "text" : " this" ,
83+ "kind" : " keyword"
84+ }
85+ ],
86+ "contextSpan" : {
87+ "start" : 51 ,
88+ "length" : 42
89+ }
90+ },
91+ "references" : [
92+ {
93+ "textSpan" : {
94+ "start" : 58 ,
95+ "length" : 5
96+ },
97+ "fileName" : " /tests/cases/fourslash/findAllRefsOnDefinition-import.ts" ,
98+ "contextSpan" : {
99+ "start" : 51 ,
100+ "length" : 42
101+ },
102+ "isWriteAccess" : true ,
103+ "isDefinition" : true
104+ },
105+ {
106+ "textSpan" : {
107+ "start" : 100 ,
108+ "length" : 5
109+ },
110+ "fileName" : " /tests/cases/fourslash/findAllRefsOnDefinition.ts" ,
111+ "isWriteAccess" : false ,
112+ "isDefinition" : false
113+ }
114+ ]
115+ }
116+ ]
Original file line number Diff line number Diff line change 1+ // === /tests/cases/fourslash/a.ts ===
2+ // interface A {
3+ // /*FIND ALL REFS*/[|foo|]: string;
4+ // }
5+
6+ // === /tests/cases/fourslash/b.ts ===
7+ // ///<reference path='a.ts'/>
8+ //
9+ //
10+ // function foo(x: A) {
11+ // x.[|foo|]
12+ // }
13+
14+ [
15+ {
16+ "definition" : {
17+ "containerKind" : " " ,
18+ "containerName" : " " ,
19+ "fileName" : " /tests/cases/fourslash/a.ts" ,
20+ "kind" : " property" ,
21+ "name" : " (property) A.foo: string" ,
22+ "textSpan" : {
23+ "start" : 18 ,
24+ "length" : 3
25+ },
26+ "displayParts" : [
27+ {
28+ "text" : " (" ,
29+ "kind" : " punctuation"
30+ },
31+ {
32+ "text" : " property" ,
33+ "kind" : " text"
34+ },
35+ {
36+ "text" : " )" ,
37+ "kind" : " punctuation"
38+ },
39+ {
40+ "text" : " " ,
41+ "kind" : " space"
42+ },
43+ {
44+ "text" : " A" ,
45+ "kind" : " interfaceName"
46+ },
47+ {
48+ "text" : " ." ,
49+ "kind" : " punctuation"
50+ },
51+ {
52+ "text" : " foo" ,
53+ "kind" : " propertyName"
54+ },
55+ {
56+ "text" : " :" ,
57+ "kind" : " punctuation"
58+ },
59+ {
60+ "text" : " " ,
61+ "kind" : " space"
62+ },
63+ {
64+ "text" : " string" ,
65+ "kind" : " keyword"
66+ }
67+ ],
68+ "contextSpan" : {
69+ "start" : 18 ,
70+ "length" : 12
71+ }
72+ },
73+ "references" : [
74+ {
75+ "textSpan" : {
76+ "start" : 18 ,
77+ "length" : 3
78+ },
79+ "fileName" : " /tests/cases/fourslash/a.ts" ,
80+ "contextSpan" : {
81+ "start" : 18 ,
82+ "length" : 12
83+ },
84+ "isWriteAccess" : false ,
85+ "isDefinition" : true
86+ },
87+ {
88+ "textSpan" : {
89+ "start" : 57 ,
90+ "length" : 3
91+ },
92+ "fileName" : " /tests/cases/fourslash/b.ts" ,
93+ "isWriteAccess" : false ,
94+ "isDefinition" : false
95+ }
96+ ]
97+ }
98+ ]
99+
100+ // === /tests/cases/fourslash/a.ts ===
101+ // interface A {
102+ // [|foo|]: string;
103+ // }
104+
105+ // === /tests/cases/fourslash/b.ts ===
106+ // ///<reference path='a.ts'/>
107+ //
108+ //
109+ // function foo(x: A) {
110+ // x./*FIND ALL REFS*/[|foo|]
111+ // }
112+
113+ [
114+ {
115+ "definition" : {
116+ "containerKind" : " " ,
117+ "containerName" : " " ,
118+ "fileName" : " /tests/cases/fourslash/a.ts" ,
119+ "kind" : " property" ,
120+ "name" : " (property) A.foo: string" ,
121+ "textSpan" : {
122+ "start" : 18 ,
123+ "length" : 3
124+ },
125+ "displayParts" : [
126+ {
127+ "text" : " (" ,
128+ "kind" : " punctuation"
129+ },
130+ {
131+ "text" : " property" ,
132+ "kind" : " text"
133+ },
134+ {
135+ "text" : " )" ,
136+ "kind" : " punctuation"
137+ },
138+ {
139+ "text" : " " ,
140+ "kind" : " space"
141+ },
142+ {
143+ "text" : " A" ,
144+ "kind" : " interfaceName"
145+ },
146+ {
147+ "text" : " ." ,
148+ "kind" : " punctuation"
149+ },
150+ {
151+ "text" : " foo" ,
152+ "kind" : " propertyName"
153+ },
154+ {
155+ "text" : " :" ,
156+ "kind" : " punctuation"
157+ },
158+ {
159+ "text" : " " ,
160+ "kind" : " space"
161+ },
162+ {
163+ "text" : " string" ,
164+ "kind" : " keyword"
165+ }
166+ ],
167+ "contextSpan" : {
168+ "start" : 18 ,
169+ "length" : 12
170+ }
171+ },
172+ "references" : [
173+ {
174+ "textSpan" : {
175+ "start" : 18 ,
176+ "length" : 3
177+ },
178+ "fileName" : " /tests/cases/fourslash/a.ts" ,
179+ "contextSpan" : {
180+ "start" : 18 ,
181+ "length" : 12
182+ },
183+ "isWriteAccess" : false
184+ },
185+ {
186+ "textSpan" : {
187+ "start" : 57 ,
188+ "length" : 3
189+ },
190+ "fileName" : " /tests/cases/fourslash/b.ts" ,
191+ "isWriteAccess" : false
192+ }
193+ ]
194+ }
195+ ]
You can’t perform that action at this time.
0 commit comments