{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "func", "typeAnnotation": { "type": "TSTypeLiteral", "members": [ { "type": "TSCallSignatureDeclaration", "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 24 } } }, "optional": true, "decorators": [], "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 15 } } }, { "type": "RestElement", "argument": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 17, "column": 29 }, "end": { "line": 17, "column": 30 } } }, "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 17, "column": 30 } } } ], "returnType": { "type": "TSBooleanKeyword", "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 17, "column": 40 } } }, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 41 } } }, { "type": "TSCallSignatureDeclaration", "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSAnyKeyword", "loc": { "start": { "line": 17, "column": 46 }, "end": { "line": 17, "column": 49 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 43 }, "end": { "line": 17, "column": 44 } } }, { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "TSArrayType", "elementType": { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 54 }, "end": { "line": 17, "column": 60 } } }, "loc": { "start": { "line": 17, "column": 54 }, "end": { "line": 17, "column": 62 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 51 }, "end": { "line": 17, "column": 52 } } }, { "type": "RestElement", "argument": { "type": "Identifier", "name": "c", "typeAnnotation": { "type": "TSArrayType", "elementType": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 70 }, "end": { "line": 17, "column": 76 } } }, "loc": { "start": { "line": 17, "column": 70 }, "end": { "line": 17, "column": 78 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 67 }, "end": { "line": 17, "column": 68 } } }, "loc": { "start": { "line": 17, "column": 64 }, "end": { "line": 17, "column": 68 } } } ], "returnType": { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 81 }, "end": { "line": 17, "column": 87 } } }, "loc": { "start": { "line": 17, "column": 42 }, "end": { "line": 17, "column": 88 } } }, { "type": "TSCallSignatureDeclaration", "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 93 }, "end": { "line": 17, "column": 99 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 90 }, "end": { "line": 17, "column": 91 } } }, { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "TSBooleanKeyword", "loc": { "start": { "line": 17, "column": 104 }, "end": { "line": 17, "column": 111 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 101 }, "end": { "line": 17, "column": 102 } } } ], "returnType": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 114 }, "end": { "line": 17, "column": 120 } } }, "loc": { "start": { "line": 17, "column": 89 }, "end": { "line": 17, "column": 122 } } } ], "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 122 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 9 } } }, "init": null, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 9 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 123 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 14 } } }, "decorators": [], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "func", "decorators": [], "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 18, "column": 21 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 18, "column": 23 } } }, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 23 } } } ], "kind": "var", "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 24 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 19, "column": 1 } } } TypeError: Type 'boolean' is not assignable to type 'string'. [functionCall_13.ts:18:5]