]> git.proxmox.com Git - pve-eslint.git/blob - eslint/tests/fixtures/parsers/arrow-parens/generics-simple-async.js
import 7.12.1 upstream release
[pve-eslint.git] / eslint / tests / fixtures / parsers / arrow-parens / generics-simple-async.js
1 "use strict";
2
3 /**
4 * Parser: @typescript-eslint/parser@3.5.0
5 * Source code:
6 * async <T>(a) => b
7 */
8
9 exports.parse = () => ({
10 type: "Program",
11 body: [
12 {
13 type: "ExpressionStatement",
14 expression: {
15 type: "ArrowFunctionExpression",
16 generator: false,
17 id: null,
18 params: [
19 {
20 type: "Identifier",
21 name: "a",
22 range: [10, 11],
23 loc: {
24 start: { line: 1, column: 10 },
25 end: { line: 1, column: 11 },
26 },
27 },
28 ],
29 body: {
30 type: "Identifier",
31 name: "b",
32 range: [16, 17],
33 loc: { start: { line: 1, column: 16 }, end: { line: 1, column: 17 } },
34 },
35 async: true,
36 expression: true,
37 range: [0, 17],
38 loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 17 } },
39 typeParameters: {
40 type: "TSTypeParameterDeclaration",
41 range: [6, 9],
42 loc: { start: { line: 1, column: 6 }, end: { line: 1, column: 9 } },
43 params: [
44 {
45 type: "TSTypeParameter",
46 name: {
47 type: "Identifier",
48 name: "T",
49 range: [7, 8],
50 loc: {
51 start: { line: 1, column: 7 },
52 end: { line: 1, column: 8 },
53 },
54 },
55 range: [7, 8],
56 loc: {
57 start: { line: 1, column: 7 },
58 end: { line: 1, column: 8 },
59 },
60 },
61 ],
62 },
63 },
64 range: [0, 17],
65 loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 17 } },
66 },
67 ],
68 sourceType: "script",
69 range: [0, 17],
70 loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 17 } },
71 tokens: [
72 {
73 type: "Identifier",
74 value: "async",
75 range: [0, 5],
76 loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 5 } },
77 },
78 {
79 type: "Punctuator",
80 value: "<",
81 range: [6, 7],
82 loc: { start: { line: 1, column: 6 }, end: { line: 1, column: 7 } },
83 },
84 {
85 type: "Identifier",
86 value: "T",
87 range: [7, 8],
88 loc: { start: { line: 1, column: 7 }, end: { line: 1, column: 8 } },
89 },
90 {
91 type: "Punctuator",
92 value: ">",
93 range: [8, 9],
94 loc: { start: { line: 1, column: 8 }, end: { line: 1, column: 9 } },
95 },
96 {
97 type: "Punctuator",
98 value: "(",
99 range: [9, 10],
100 loc: { start: { line: 1, column: 9 }, end: { line: 1, column: 10 } },
101 },
102 {
103 type: "Identifier",
104 value: "a",
105 range: [10, 11],
106 loc: { start: { line: 1, column: 10 }, end: { line: 1, column: 11 } },
107 },
108 {
109 type: "Punctuator",
110 value: ")",
111 range: [11, 12],
112 loc: { start: { line: 1, column: 11 }, end: { line: 1, column: 12 } },
113 },
114 {
115 type: "Punctuator",
116 value: "=>",
117 range: [13, 15],
118 loc: { start: { line: 1, column: 13 }, end: { line: 1, column: 15 } },
119 },
120 {
121 type: "Identifier",
122 value: "b",
123 range: [16, 17],
124 loc: { start: { line: 1, column: 16 }, end: { line: 1, column: 17 } },
125 },
126 ],
127 comments: [],
128 });