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 "loc": { 177 "start": { 178 "line": 19, 179 "column": 1 180 }, 181 "end": { 182 "line": 28, 183 "column": 2 184 } 185 } 186 }, 187 "body": [ 188 { 189 "type": "ClassProperty", 190 "key": { 191 "type": "Identifier", 192 "name": "count", 193 "loc": { 194 "start": { 195 "line": 20, 196 "column": 10 197 }, 198 "end": { 199 "line": 20, 200 "column": 15 201 } 202 } 203 }, 204 "value": { 205 "type": "NumberLiteral", 206 "value": 0, 207 "loc": { 208 "start": { 209 "line": 20, 210 "column": 18 211 }, 212 "end": { 213 "line": 20, 214 "column": 19 215 } 216 } 217 }, 218 "static": true, 219 "readonly": false, 220 "declare": false, 221 "optional": false, 222 "computed": false, 223 "decorators": [], 224 "loc": { 225 "start": { 226 "line": 20, 227 "column": 3 228 }, 229 "end": { 230 "line": 20, 231 "column": 19 232 } 233 } 234 }, 235 { 236 "type": "ClassStaticBlock", 237 "body": { 238 "type": "BlockStatement", 239 "statements": [ 240 { 241 "type": "IfStatement", 242 "test": { 243 "type": "CallExpression", 244 "callee": { 245 "type": "Identifier", 246 "name": "someCondition", 247 "loc": { 248 "start": { 249 "line": 22, 250 "column": 9 251 }, 252 "end": { 253 "line": 22, 254 "column": 22 255 } 256 } 257 }, 258 "arguments": [ 259 { 260 "type": "NumberLiteral", 261 "value": 5, 262 "loc": { 263 "start": { 264 "line": 22, 265 "column": 23 266 }, 267 "end": { 268 "line": 22, 269 "column": 24 270 } 271 } 272 } 273 ], 274 "optional": false, 275 "loc": { 276 "start": { 277 "line": 22, 278 "column": 9 279 }, 280 "end": { 281 "line": 22, 282 "column": 25 283 } 284 } 285 }, 286 "consequent": { 287 "type": "BlockStatement", 288 "statements": [ 289 { 290 "type": "ExpressionStatement", 291 "expression": { 292 "type": "UpdateExpression", 293 "operator": "++", 294 "prefix": false, 295 "argument": { 296 "type": "MemberExpression", 297 "object": { 298 "type": "Identifier", 299 "name": "Foo", 300 "loc": { 301 "start": { 302 "line": 23, 303 "column": 7 304 }, 305 "end": { 306 "line": 23, 307 "column": 10 308 } 309 } 310 }, 311 "property": { 312 "type": "Identifier", 313 "name": "count", 314 "loc": { 315 "start": { 316 "line": 23, 317 "column": 11 318 }, 319 "end": { 320 "line": 23, 321 "column": 16 322 } 323 } 324 }, 325 "computed": false, 326 "optional": false, 327 "loc": { 328 "start": { 329 "line": 23, 330 "column": 7 331 }, 332 "end": { 333 "line": 23, 334 "column": 16 335 } 336 } 337 }, 338 "loc": { 339 "start": { 340 "line": 23, 341 "column": 7 342 }, 343 "end": { 344 "line": 23, 345 "column": 18 346 } 347 } 348 }, 349 "loc": { 350 "start": { 351 "line": 23, 352 "column": 7 353 }, 354 "end": { 355 "line": 23, 356 "column": 19 357 } 358 } 359 } 360 ], 361 "loc": { 362 "start": { 363 "line": 22, 364 "column": 27 365 }, 366 "end": { 367 "line": 24, 368 "column": 6 369 } 370 } 371 }, 372 "alternate": { 373 "type": "BlockStatement", 374 "statements": [ 375 { 376 "type": "ExpressionStatement", 377 "expression": { 378 "type": "UpdateExpression", 379 "operator": "--", 380 "prefix": false, 381 "argument": { 382 "type": "MemberExpression", 383 "object": { 384 "type": "Identifier", 385 "name": "Foo", 386 "loc": { 387 "start": { 388 "line": 25, 389 "column": 7 390 }, 391 "end": { 392 "line": 25, 393 "column": 10 394 } 395 } 396 }, 397 "property": { 398 "type": "Identifier", 399 "name": "count", 400 "loc": { 401 "start": { 402 "line": 25, 403 "column": 11 404 }, 405 "end": { 406 "line": 25, 407 "column": 16 408 } 409 } 410 }, 411 "computed": false, 412 "optional": false, 413 "loc": { 414 "start": { 415 "line": 25, 416 "column": 7 417 }, 418 "end": { 419 "line": 25, 420 "column": 16 421 } 422 } 423 }, 424 "loc": { 425 "start": { 426 "line": 25, 427 "column": 7 428 }, 429 "end": { 430 "line": 25, 431 "column": 18 432 } 433 } 434 }, 435 "loc": { 436 "start": { 437 "line": 25, 438 "column": 7 439 }, 440 "end": { 441 "line": 25, 442 "column": 19 443 } 444 } 445 } 446 ], 447 "loc": { 448 "start": { 449 "line": 24, 450 "column": 12 451 }, 452 "end": { 453 "line": 26, 454 "column": 6 455 } 456 } 457 }, 458 "loc": { 459 "start": { 460 "line": 22, 461 "column": 5 462 }, 463 "end": { 464 "line": 26, 465 "column": 6 466 } 467 } 468 } 469 ], 470 "loc": { 471 "start": { 472 "line": 21, 473 "column": 10 474 }, 475 "end": { 476 "line": 27, 477 "column": 4 478 } 479 } 480 }, 481 "loc": { 482 "start": { 483 "line": 21, 484 "column": 3 485 }, 486 "end": { 487 "line": 27, 488 "column": 4 489 } 490 } 491 } 492 ], 493 "indexSignatures": [], 494 "loc": { 495 "start": { 496 "line": 19, 497 "column": 11 498 }, 499 "end": { 500 "line": 28, 501 "column": 2 502 } 503 } 504 }, 505 "decorators": [], 506 "loc": { 507 "start": { 508 "line": 19, 509 "column": 1 510 }, 511 "end": { 512 "line": 28, 513 "column": 2 514 } 515 } 516 } 517 ], 518 "loc": { 519 "start": { 520 "line": 1, 521 "column": 1 522 }, 523 "end": { 524 "line": 28, 525 "column": 2 526 } 527 } 528} 529