{ "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": "RestElement", "argument": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSArrayType", "elementType": { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 27 } } }, "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 29 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 19 } } }, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 19 } } } ], "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 6, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 13 } } }, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 14 } } } ], "loc": { "start": { "line": 17, "column": 31 }, "end": { "line": 19, "column": 2 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 19, "column": 2 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 19, "column": 2 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "func", "decorators": [], "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 21, "column": 5 } } }, "arguments": [ { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 7 } } } ], "optional": false, "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 21, "column": 8 } } }, "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 21, "column": 9 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 21, "column": 9 } } } TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [functionCall_7.ts:21:6]