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