1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "FunctionDeclaration", 6 "function": { 7 "type": "ScriptFunction", 8 "id": { 9 "type": "Identifier", 10 "name": "test", 11 "loc": { 12 "start": { 13 "line": 17, 14 "column": 10 15 }, 16 "end": { 17 "line": 17, 18 "column": 14 19 } 20 } 21 }, 22 "generator": false, 23 "async": false, 24 "expression": false, 25 "params": [ 26 { 27 "type": "Identifier", 28 "name": "x", 29 "typeAnnotation": { 30 "type": "TSBooleanKeyword", 31 "loc": { 32 "start": { 33 "line": 17, 34 "column": 18 35 }, 36 "end": { 37 "line": 17, 38 "column": 25 39 } 40 } 41 }, 42 "loc": { 43 "start": { 44 "line": 17, 45 "column": 15 46 }, 47 "end": { 48 "line": 17, 49 "column": 16 50 } 51 } 52 } 53 ], 54 "returnType": { 55 "type": "TSBooleanKeyword", 56 "loc": { 57 "start": { 58 "line": 17, 59 "column": 28 60 }, 61 "end": { 62 "line": 17, 63 "column": 35 64 } 65 } 66 }, 67 "body": { 68 "type": "BlockStatement", 69 "statements": [ 70 { 71 "type": "ReturnStatement", 72 "argument": { 73 "type": "Identifier", 74 "name": "x", 75 "loc": { 76 "start": { 77 "line": 17, 78 "column": 45 79 }, 80 "end": { 81 "line": 17, 82 "column": 46 83 } 84 } 85 }, 86 "loc": { 87 "start": { 88 "line": 17, 89 "column": 38 90 }, 91 "end": { 92 "line": 17, 93 "column": 47 94 } 95 } 96 } 97 ], 98 "loc": { 99 "start": { 100 "line": 17, 101 "column": 36 102 }, 103 "end": { 104 "line": 17, 105 "column": 49 106 } 107 } 108 }, 109 "loc": { 110 "start": { 111 "line": 17, 112 "column": 1 113 }, 114 "end": { 115 "line": 17, 116 "column": 49 117 } 118 } 119 }, 120 "loc": { 121 "start": { 122 "line": 17, 123 "column": 1 124 }, 125 "end": { 126 "line": 17, 127 "column": 49 128 } 129 } 130 }, 131 { 132 "type": "VariableDeclaration", 133 "declarations": [ 134 { 135 "type": "VariableDeclarator", 136 "id": { 137 "type": "Identifier", 138 "name": "state", 139 "loc": { 140 "start": { 141 "line": 19, 142 "column": 5 143 }, 144 "end": { 145 "line": 19, 146 "column": 10 147 } 148 } 149 }, 150 "init": { 151 "type": "BooleanLiteral", 152 "value": true, 153 "loc": { 154 "start": { 155 "line": 19, 156 "column": 13 157 }, 158 "end": { 159 "line": 19, 160 "column": 17 161 } 162 } 163 }, 164 "loc": { 165 "start": { 166 "line": 19, 167 "column": 5 168 }, 169 "end": { 170 "line": 19, 171 "column": 17 172 } 173 } 174 } 175 ], 176 "kind": "let", 177 "loc": { 178 "start": { 179 "line": 19, 180 "column": 1 181 }, 182 "end": { 183 "line": 19, 184 "column": 18 185 } 186 } 187 }, 188 { 189 "type": "IfStatement", 190 "test": { 191 "type": "Identifier", 192 "name": "state", 193 "loc": { 194 "start": { 195 "line": 21, 196 "column": 5 197 }, 198 "end": { 199 "line": 21, 200 "column": 10 201 } 202 } 203 }, 204 "consequent": { 205 "type": "BlockStatement", 206 "statements": [ 207 { 208 "type": "ExpressionStatement", 209 "expression": { 210 "type": "CallExpression", 211 "callee": { 212 "type": "Identifier", 213 "name": "test", 214 "loc": { 215 "start": { 216 "line": 22, 217 "column": 3 218 }, 219 "end": { 220 "line": 22, 221 "column": 7 222 } 223 } 224 }, 225 "arguments": [ 226 { 227 "type": "LogicalExpression", 228 "operator": "&&", 229 "left": { 230 "type": "TSAsExpression", 231 "expression": { 232 "type": "Identifier", 233 "name": "state", 234 "loc": { 235 "start": { 236 "line": 22, 237 "column": 8 238 }, 239 "end": { 240 "line": 22, 241 "column": 13 242 } 243 } 244 }, 245 "typeAnnotation": { 246 "type": "TSAnyKeyword", 247 "loc": { 248 "start": { 249 "line": 22, 250 "column": 17 251 }, 252 "end": { 253 "line": 22, 254 "column": 20 255 } 256 } 257 }, 258 "loc": { 259 "start": { 260 "line": 22, 261 "column": 8 262 }, 263 "end": { 264 "line": 22, 265 "column": 23 266 } 267 } 268 }, 269 "right": { 270 "type": "Identifier", 271 "name": "state", 272 "loc": { 273 "start": { 274 "line": 22, 275 "column": 24 276 }, 277 "end": { 278 "line": 22, 279 "column": 29 280 } 281 } 282 }, 283 "loc": { 284 "start": { 285 "line": 22, 286 "column": 8 287 }, 288 "end": { 289 "line": 22, 290 "column": 29 291 } 292 } 293 } 294 ], 295 "optional": false, 296 "loc": { 297 "start": { 298 "line": 22, 299 "column": 3 300 }, 301 "end": { 302 "line": 22, 303 "column": 30 304 } 305 } 306 }, 307 "loc": { 308 "start": { 309 "line": 22, 310 "column": 3 311 }, 312 "end": { 313 "line": 22, 314 "column": 31 315 } 316 } 317 } 318 ], 319 "loc": { 320 "start": { 321 "line": 21, 322 "column": 12 323 }, 324 "end": { 325 "line": 23, 326 "column": 2 327 } 328 } 329 }, 330 "alternate": null, 331 "loc": { 332 "start": { 333 "line": 21, 334 "column": 1 335 }, 336 "end": { 337 "line": 23, 338 "column": 2 339 } 340 } 341 } 342 ], 343 "loc": { 344 "start": { 345 "line": 1, 346 "column": 1 347 }, 348 "end": { 349 "line": 23, 350 "column": 2 351 } 352 } 353} 354