(sourceFile *ast.SourceFile, node *ast.Node)
| 2540 | } |
| 2541 | |
| 2542 | func getErrorRangeForArrowFunction(sourceFile *ast.SourceFile, node *ast.Node) core.TextRange { |
| 2543 | pos := SkipTrivia(sourceFile.Text(), node.Pos()) |
| 2544 | body := node.Body() |
| 2545 | if body != nil && body.Kind == ast.KindBlock { |
| 2546 | startLine := GetECMALineOfPosition(sourceFile, body.Pos()) |
| 2547 | endLine := GetECMALineOfPosition(sourceFile, body.End()) |
| 2548 | if startLine < endLine { |
| 2549 | // The arrow function spans multiple lines, make the error span be the first line, inclusive. |
| 2550 | return core.NewTextRange(pos, GetECMAEndLinePosition(sourceFile, startLine)+1) |
| 2551 | } |
| 2552 | } |
| 2553 | return core.NewTextRange(pos, node.End()) |
| 2554 | } |
| 2555 | |
| 2556 | func findOriginatingJSDocSatisfiesTag(sourceFile *ast.SourceFile, node *ast.Node) *ast.Node { |
| 2557 | targetType := node.AsSatisfiesExpression().Type |
no test coverage detected