]> git.proxmox.com Git - pve-eslint.git/blob - eslint/tests/fixtures/parsers/keyword-spacing/prefix-cast-operator-space.js
import 8.3.0 source
[pve-eslint.git] / eslint / tests / fixtures / parsers / keyword-spacing / prefix-cast-operator-space.js
1 "use strict";
2
3 /**
4 * Parser: @typescript-eslint/parser@5.0.0
5 *
6 * Source code:
7 * <Thing> this.blah
8 */
9
10 exports.parse = () => ({
11 type: "Program",
12 body: [
13 {
14 type: "ExpressionStatement",
15 expression: {
16 type: "TSTypeAssertion",
17 typeAnnotation: {
18 type: "TSTypeReference",
19 typeName: {
20 type: "Identifier",
21 name: "Thing",
22 range: [1, 6],
23 loc: {
24 start: { line: 1, column: 1 },
25 end: { line: 1, column: 6 },
26 },
27 },
28 range: [1, 6],
29 loc: {
30 start: { line: 1, column: 1 },
31 end: { line: 1, column: 6 },
32 },
33 },
34 expression: {
35 type: "MemberExpression",
36 object: {
37 type: "ThisExpression",
38 range: [8, 12],
39 loc: {
40 start: { line: 1, column: 8 },
41 end: { line: 1, column: 12 },
42 },
43 },
44 property: {
45 type: "Identifier",
46 name: "blah",
47 range: [13, 17],
48 loc: {
49 start: { line: 1, column: 13 },
50 end: { line: 1, column: 17 },
51 },
52 },
53 computed: false,
54 optional: false,
55 range: [8, 17],
56 loc: {
57 start: { line: 1, column: 8 },
58 end: { line: 1, column: 17 },
59 },
60 },
61 range: [0, 17],
62 loc: {
63 start: { line: 1, column: 0 },
64 end: { line: 1, column: 17 },
65 },
66 },
67 range: [0, 17],
68 loc: {
69 start: { line: 1, column: 0 },
70 end: { line: 1, column: 17 },
71 },
72 },
73 ],
74 sourceType: "script",
75 range: [0, 17],
76 loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 17 } },
77 tokens: [
78 {
79 type: "Punctuator",
80 value: "<",
81 range: [0, 1],
82 loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 1 } },
83 },
84 {
85 type: "Identifier",
86 value: "Thing",
87 range: [1, 6],
88 loc: { start: { line: 1, column: 1 }, end: { line: 1, column: 6 } },
89 },
90 {
91 type: "Punctuator",
92 value: ">",
93 range: [6, 7],
94 loc: { start: { line: 1, column: 6 }, end: { line: 1, column: 7 } },
95 },
96 {
97 type: "Keyword",
98 value: "this",
99 range: [8, 12],
100 loc: {
101 start: { line: 1, column: 8 },
102 end: { line: 1, column: 12 },
103 },
104 },
105 {
106 type: "Punctuator",
107 value: ".",
108 range: [12, 13],
109 loc: {
110 start: { line: 1, column: 12 },
111 end: { line: 1, column: 13 },
112 },
113 },
114 {
115 type: "Identifier",
116 value: "blah",
117 range: [13, 17],
118 loc: {
119 start: { line: 1, column: 13 },
120 end: { line: 1, column: 17 },
121 },
122 },
123 ],
124 comments: [],
125 });