{ "type": "Program", "statements": [ { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "func", "decorators": [], "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 25 } } }, "optional": true, "decorators": [], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 16 } } }, { "type": "RestElement", "argument": { "type": "Identifier", "name": "c", "typeAnnotation": { "type": "TSArrayType", "elementType": { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 17, "column": 39 } } }, "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 17, "column": 41 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 30 }, "end": { "line": 17, "column": 31 } } }, "loc": { "start": { "line": 17, "column": 27 }, "end": { "line": 17, "column": 31 } } } ], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 17, "column": 43 }, "end": { "line": 18, "column": 2 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 18, "column": 2 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 18, "column": 2 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "func", "decorators": [], "loc": { "start": { "line": 20, "column": 1 }, "end": { "line": 20, "column": 5 } } }, "arguments": [ { "type": "StringLiteral", "value": "bar", "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 11 } } } ], "optional": false, "loc": { "start": { "line": 20, "column": 1 }, "end": { "line": 20, "column": 12 } } }, "loc": { "start": { "line": 20, "column": 1 }, "end": { "line": 20, "column": 12 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 20, "column": 12 } } } TypeError: Type 'string' is not assignable to type 'number'. [functionCall_8.ts:20:6]