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