1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "FunctionDeclaration", 6 "function": { 7 "type": "ScriptFunction", 8 "id": { 9 "type": "Identifier", 10 "name": "func", 11 "decorators": [], 12 "loc": { 13 "start": { 14 "line": 17, 15 "column": 10 16 }, 17 "end": { 18 "line": 17, 19 "column": 14 20 } 21 } 22 }, 23 "generator": false, 24 "async": false, 25 "expression": false, 26 "params": [ 27 { 28 "type": "Identifier", 29 "name": "a", 30 "typeAnnotation": { 31 "type": "TSNumberKeyword", 32 "loc": { 33 "start": { 34 "line": 17, 35 "column": 19 36 }, 37 "end": { 38 "line": 17, 39 "column": 25 40 } 41 } 42 }, 43 "decorators": [], 44 "loc": { 45 "start": { 46 "line": 17, 47 "column": 15 48 }, 49 "end": { 50 "line": 17, 51 "column": 16 52 } 53 } 54 } 55 ], 56 "returnType": { 57 "type": "TSVoidKeyword", 58 "loc": { 59 "start": { 60 "line": 17, 61 "column": 29 62 }, 63 "end": { 64 "line": 17, 65 "column": 33 66 } 67 } 68 }, 69 "body": { 70 "type": "BlockStatement", 71 "statements": [], 72 "loc": { 73 "start": { 74 "line": 17, 75 "column": 34 76 }, 77 "end": { 78 "line": 19, 79 "column": 2 80 } 81 } 82 }, 83 "loc": { 84 "start": { 85 "line": 17, 86 "column": 1 87 }, 88 "end": { 89 "line": 19, 90 "column": 2 91 } 92 } 93 }, 94 "loc": { 95 "start": { 96 "line": 17, 97 "column": 1 98 }, 99 "end": { 100 "line": 19, 101 "column": 2 102 } 103 } 104 }, 105 { 106 "type": "ExpressionStatement", 107 "expression": { 108 "type": "CallExpression", 109 "callee": { 110 "type": "Identifier", 111 "name": "func", 112 "decorators": [], 113 "loc": { 114 "start": { 115 "line": 20, 116 "column": 1 117 }, 118 "end": { 119 "line": 20, 120 "column": 5 121 } 122 } 123 }, 124 "arguments": [ 125 { 126 "type": "StringLiteral", 127 "value": "foo", 128 "loc": { 129 "start": { 130 "line": 20, 131 "column": 6 132 }, 133 "end": { 134 "line": 20, 135 "column": 11 136 } 137 } 138 } 139 ], 140 "optional": false, 141 "loc": { 142 "start": { 143 "line": 20, 144 "column": 1 145 }, 146 "end": { 147 "line": 20, 148 "column": 12 149 } 150 } 151 }, 152 "loc": { 153 "start": { 154 "line": 20, 155 "column": 1 156 }, 157 "end": { 158 "line": 20, 159 "column": 13 160 } 161 } 162 } 163 ], 164 "loc": { 165 "start": { 166 "line": 1, 167 "column": 1 168 }, 169 "end": { 170 "line": 20, 171 "column": 13 172 } 173 } 174} 175TypeError: Type 'string' is not assignable to type 'number'. [functionCall_1.ts:20:6] 176