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