(errorMsg: string, errorNode?: typescript.Node)
| 313 | |
| 314 | // Helper to handle errors based on throws option |
| 315 | function handleError(errorMsg: string, errorNode?: typescript.Node): void { |
| 316 | let locationMsg = errorMsg |
| 317 | if (errorNode) { |
| 318 | const {line, character} = ts.getLineAndCharacterOfPosition( |
| 319 | sf, |
| 320 | errorNode.getStart(sf) |
| 321 | ) |
| 322 | locationMsg = `${sf.fileName}:${line + 1}:${character + 1} ${errorMsg}` |
| 323 | } |
| 324 | const error = new Error(locationMsg) |
| 325 | if (throws) { |
| 326 | throw error |
| 327 | } |
| 328 | extractionError = error |
| 329 | if (onMsgError) { |
| 330 | onMsgError(sf.fileName, error) |
| 331 | } |
| 332 | } |
| 333 | let properties: |
| 334 | | typescript.NodeArray<typescript.ObjectLiteralElement> |
| 335 | | typescript.NodeArray<typescript.JsxAttributeLike> |
no test coverage detected