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