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