1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "FunctionDeclaration", 6 "function": { 7 "type": "ScriptFunction", 8 "id": { 9 "type": "Identifier", 10 "name": "func1", 11 "decorators": [], 12 "loc": { 13 "start": { 14 "line": 17, 15 "column": 10 16 }, 17 "end": { 18 "line": 17, 19 "column": 15 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": 20 36 }, 37 "end": { 38 "line": 17, 39 "column": 26 40 } 41 } 42 }, 43 "decorators": [], 44 "loc": { 45 "start": { 46 "line": 17, 47 "column": 16 48 }, 49 "end": { 50 "line": 17, 51 "column": 17 52 } 53 } 54 } 55 ], 56 "returnType": { 57 "type": "TSVoidKeyword", 58 "loc": { 59 "start": { 60 "line": 17, 61 "column": 30 62 }, 63 "end": { 64 "line": 17, 65 "column": 34 66 } 67 } 68 }, 69 "body": { 70 "type": "BlockStatement", 71 "statements": [], 72 "loc": { 73 "start": { 74 "line": 17, 75 "column": 35 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": "FunctionDeclaration", 107 "function": { 108 "type": "ScriptFunction", 109 "id": { 110 "type": "Identifier", 111 "name": "func2", 112 "decorators": [], 113 "loc": { 114 "start": { 115 "line": 21, 116 "column": 10 117 }, 118 "end": { 119 "line": 21, 120 "column": 15 121 } 122 } 123 }, 124 "generator": false, 125 "async": false, 126 "expression": false, 127 "params": [ 128 { 129 "type": "Identifier", 130 "name": "a", 131 "typeAnnotation": { 132 "type": "TSNumberKeyword", 133 "loc": { 134 "start": { 135 "line": 21, 136 "column": 20 137 }, 138 "end": { 139 "line": 21, 140 "column": 26 141 } 142 } 143 }, 144 "decorators": [], 145 "loc": { 146 "start": { 147 "line": 21, 148 "column": 16 149 }, 150 "end": { 151 "line": 21, 152 "column": 17 153 } 154 } 155 } 156 ], 157 "returnType": { 158 "type": "TSStringKeyword", 159 "loc": { 160 "start": { 161 "line": 21, 162 "column": 30 163 }, 164 "end": { 165 "line": 21, 166 "column": 36 167 } 168 } 169 }, 170 "body": { 171 "type": "BlockStatement", 172 "statements": [ 173 { 174 "type": "ReturnStatement", 175 "argument": { 176 "type": "StringLiteral", 177 "value": "foo", 178 "loc": { 179 "start": { 180 "line": 22, 181 "column": 12 182 }, 183 "end": { 184 "line": 22, 185 "column": 17 186 } 187 } 188 }, 189 "loc": { 190 "start": { 191 "line": 22, 192 "column": 5 193 }, 194 "end": { 195 "line": 22, 196 "column": 18 197 } 198 } 199 } 200 ], 201 "loc": { 202 "start": { 203 "line": 21, 204 "column": 36 205 }, 206 "end": { 207 "line": 23, 208 "column": 2 209 } 210 } 211 }, 212 "loc": { 213 "start": { 214 "line": 21, 215 "column": 1 216 }, 217 "end": { 218 "line": 23, 219 "column": 2 220 } 221 } 222 }, 223 "loc": { 224 "start": { 225 "line": 21, 226 "column": 1 227 }, 228 "end": { 229 "line": 23, 230 "column": 2 231 } 232 } 233 }, 234 { 235 "type": "ExpressionStatement", 236 "expression": { 237 "type": "CallExpression", 238 "callee": { 239 "type": "Identifier", 240 "name": "func1", 241 "decorators": [], 242 "loc": { 243 "start": { 244 "line": 24, 245 "column": 1 246 }, 247 "end": { 248 "line": 24, 249 "column": 6 250 } 251 } 252 }, 253 "arguments": [ 254 { 255 "type": "CallExpression", 256 "callee": { 257 "type": "Identifier", 258 "name": "func2", 259 "decorators": [], 260 "loc": { 261 "start": { 262 "line": 24, 263 "column": 7 264 }, 265 "end": { 266 "line": 24, 267 "column": 12 268 } 269 } 270 }, 271 "arguments": [ 272 { 273 "type": "NumberLiteral", 274 "value": 5, 275 "loc": { 276 "start": { 277 "line": 24, 278 "column": 13 279 }, 280 "end": { 281 "line": 24, 282 "column": 14 283 } 284 } 285 } 286 ], 287 "optional": false, 288 "loc": { 289 "start": { 290 "line": 24, 291 "column": 7 292 }, 293 "end": { 294 "line": 24, 295 "column": 15 296 } 297 } 298 } 299 ], 300 "optional": false, 301 "loc": { 302 "start": { 303 "line": 24, 304 "column": 1 305 }, 306 "end": { 307 "line": 24, 308 "column": 16 309 } 310 } 311 }, 312 "loc": { 313 "start": { 314 "line": 24, 315 "column": 1 316 }, 317 "end": { 318 "line": 24, 319 "column": 17 320 } 321 } 322 } 323 ], 324 "loc": { 325 "start": { 326 "line": 1, 327 "column": 1 328 }, 329 "end": { 330 "line": 24, 331 "column": 17 332 } 333 } 334} 335TypeError: Type 'string' is not assignable to type 'number'. [functionCall_2.ts:24:7] 336