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