( code: ErrorCode, node: ts.Node, messageText: string | ts.DiagnosticMessageChain, relatedInformation?: ts.DiagnosticRelatedInformation[], category: ts.DiagnosticCategory = ts.DiagnosticCategory.Error, )
| 46 | } |
| 47 | |
| 48 | export function makeDiagnostic( |
| 49 | code: ErrorCode, |
| 50 | node: ts.Node, |
| 51 | messageText: string | ts.DiagnosticMessageChain, |
| 52 | relatedInformation?: ts.DiagnosticRelatedInformation[], |
| 53 | category: ts.DiagnosticCategory = ts.DiagnosticCategory.Error, |
| 54 | ): ts.DiagnosticWithLocation { |
| 55 | node = ts.getOriginalNode(node); |
| 56 | return { |
| 57 | category, |
| 58 | code: ngErrorCode(code), |
| 59 | file: ts.getOriginalNode(node).getSourceFile(), |
| 60 | start: node.getStart(undefined, false), |
| 61 | length: node.getWidth(), |
| 62 | messageText, |
| 63 | relatedInformation, |
| 64 | }; |
| 65 | } |
| 66 | |
| 67 | export function makeDiagnosticChain( |
| 68 | messageText: string, |
no test coverage detected