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