]> git.proxmox.com Git - pve-eslint.git/blob - eslint/tests/fixtures/parsers/unknown-nodes/interface.js
first commit
[pve-eslint.git] / eslint / tests / fixtures / parsers / unknown-nodes / interface.js
1 "use strict";
2
3 /**
4 * Source code:
5 * interface Foo { bar: string; baz: number; }
6 */
7
8
9 exports.parse = () => ({
10 "type": "Program",
11 "range": [
12 0,
13 51
14 ],
15 "loc": {
16 "start": {
17 "line": 1,
18 "column": 0
19 },
20 "end": {
21 "line": 4,
22 "column": 1
23 }
24 },
25 "body": [
26 {
27 "type": "TSInterfaceDeclaration",
28 "range": [
29 0,
30 51
31 ],
32 "loc": {
33 "start": {
34 "line": 1,
35 "column": 0
36 },
37 "end": {
38 "line": 4,
39 "column": 1
40 }
41 },
42 "name": {
43 "type": "Identifier",
44 "range": [
45 10,
46 13
47 ],
48 "loc": {
49 "start": {
50 "line": 1,
51 "column": 10
52 },
53 "end": {
54 "line": 1,
55 "column": 13
56 }
57 },
58 "name": "Foo"
59 },
60 "members": [
61 {
62 "type": "TSPropertySignature",
63 "range": [
64 20,
65 32
66 ],
67 "loc": {
68 "start": {
69 "line": 2,
70 "column": 4
71 },
72 "end": {
73 "line": 2,
74 "column": 16
75 }
76 },
77 "name": {
78 "type": "Identifier",
79 "range": [
80 20,
81 23
82 ],
83 "loc": {
84 "start": {
85 "line": 2,
86 "column": 4
87 },
88 "end": {
89 "line": 2,
90 "column": 7
91 }
92 },
93 "name": "bar"
94 },
95 "typeAnnotation": {
96 "type": "TypeAnnotation",
97 "loc": {
98 "start": {
99 "line": 2,
100 "column": 9
101 },
102 "end": {
103 "line": 2,
104 "column": 15
105 }
106 },
107 "range": [
108 25,
109 31
110 ],
111 "typeAnnotation": {
112 "type": "TSStringKeyword",
113 "range": [
114 25,
115 31
116 ],
117 "loc": {
118 "start": {
119 "line": 2,
120 "column": 9
121 },
122 "end": {
123 "line": 2,
124 "column": 15
125 }
126 }
127 }
128 }
129 },
130 {
131 "type": "TSPropertySignature",
132 "range": [
133 37,
134 49
135 ],
136 "loc": {
137 "start": {
138 "line": 3,
139 "column": 4
140 },
141 "end": {
142 "line": 3,
143 "column": 16
144 }
145 },
146 "name": {
147 "type": "Identifier",
148 "range": [
149 37,
150 40
151 ],
152 "loc": {
153 "start": {
154 "line": 3,
155 "column": 4
156 },
157 "end": {
158 "line": 3,
159 "column": 7
160 }
161 },
162 "name": "baz"
163 },
164 "typeAnnotation": {
165 "type": "TypeAnnotation",
166 "loc": {
167 "start": {
168 "line": 3,
169 "column": 9
170 },
171 "end": {
172 "line": 3,
173 "column": 15
174 }
175 },
176 "range": [
177 42,
178 48
179 ],
180 "typeAnnotation": {
181 "type": "TSNumberKeyword",
182 "range": [
183 42,
184 48
185 ],
186 "loc": {
187 "start": {
188 "line": 3,
189 "column": 9
190 },
191 "end": {
192 "line": 3,
193 "column": 15
194 }
195 }
196 }
197 }
198 }
199 ]
200 }
201 ],
202 "sourceType": "script",
203 "tokens": [
204 {
205 "type": "Keyword",
206 "value": "interface",
207 "start": 0,
208 "end": 9,
209 "range": [
210 0,
211 9
212 ],
213 "loc": {
214 "start": {
215 "line": 1,
216 "column": 0
217 },
218 "end": {
219 "line": 1,
220 "column": 9
221 }
222 }
223 },
224 {
225 "type": "Identifier",
226 "value": "Foo",
227 "start": 10,
228 "end": 13,
229 "range": [
230 10,
231 13
232 ],
233 "loc": {
234 "start": {
235 "line": 1,
236 "column": 10
237 },
238 "end": {
239 "line": 1,
240 "column": 13
241 }
242 }
243 },
244 {
245 "type": "Punctuator",
246 "value": "{",
247 "start": 14,
248 "end": 15,
249 "range": [
250 14,
251 15
252 ],
253 "loc": {
254 "start": {
255 "line": 1,
256 "column": 14
257 },
258 "end": {
259 "line": 1,
260 "column": 15
261 }
262 }
263 },
264 {
265 "type": "Identifier",
266 "value": "bar",
267 "start": 20,
268 "end": 23,
269 "range": [
270 20,
271 23
272 ],
273 "loc": {
274 "start": {
275 "line": 2,
276 "column": 4
277 },
278 "end": {
279 "line": 2,
280 "column": 7
281 }
282 }
283 },
284 {
285 "type": "Punctuator",
286 "value": ":",
287 "start": 23,
288 "end": 24,
289 "range": [
290 23,
291 24
292 ],
293 "loc": {
294 "start": {
295 "line": 2,
296 "column": 7
297 },
298 "end": {
299 "line": 2,
300 "column": 8
301 }
302 }
303 },
304 {
305 "type": "Identifier",
306 "value": "string",
307 "start": 25,
308 "end": 31,
309 "range": [
310 25,
311 31
312 ],
313 "loc": {
314 "start": {
315 "line": 2,
316 "column": 9
317 },
318 "end": {
319 "line": 2,
320 "column": 15
321 }
322 }
323 },
324 {
325 "type": "Punctuator",
326 "value": ";",
327 "start": 31,
328 "end": 32,
329 "range": [
330 31,
331 32
332 ],
333 "loc": {
334 "start": {
335 "line": 2,
336 "column": 15
337 },
338 "end": {
339 "line": 2,
340 "column": 16
341 }
342 }
343 },
344 {
345 "type": "Identifier",
346 "value": "baz",
347 "start": 37,
348 "end": 40,
349 "range": [
350 37,
351 40
352 ],
353 "loc": {
354 "start": {
355 "line": 3,
356 "column": 4
357 },
358 "end": {
359 "line": 3,
360 "column": 7
361 }
362 }
363 },
364 {
365 "type": "Punctuator",
366 "value": ":",
367 "start": 40,
368 "end": 41,
369 "range": [
370 40,
371 41
372 ],
373 "loc": {
374 "start": {
375 "line": 3,
376 "column": 7
377 },
378 "end": {
379 "line": 3,
380 "column": 8
381 }
382 }
383 },
384 {
385 "type": "Identifier",
386 "value": "number",
387 "start": 42,
388 "end": 48,
389 "range": [
390 42,
391 48
392 ],
393 "loc": {
394 "start": {
395 "line": 3,
396 "column": 9
397 },
398 "end": {
399 "line": 3,
400 "column": 15
401 }
402 }
403 },
404 {
405 "type": "Punctuator",
406 "value": ";",
407 "start": 48,
408 "end": 49,
409 "range": [
410 48,
411 49
412 ],
413 "loc": {
414 "start": {
415 "line": 3,
416 "column": 15
417 },
418 "end": {
419 "line": 3,
420 "column": 16
421 }
422 }
423 },
424 {
425 "type": "Punctuator",
426 "value": "}",
427 "start": 50,
428 "end": 51,
429 "range": [
430 50,
431 51
432 ],
433 "loc": {
434 "start": {
435 "line": 4,
436 "column": 0
437 },
438 "end": {
439 "line": 4,
440 "column": 1
441 }
442 }
443 }
444 ],
445 "comments": []
446 });