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