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