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