( error: Error, syntaxError: ParsingError, query: Query )
| 111 | } |
| 112 | |
| 113 | export function augmentQuerySyntaxError( |
| 114 | error: Error, |
| 115 | syntaxError: ParsingError, |
| 116 | query: Query |
| 117 | ): CodeError { |
| 118 | // tslint:disable-next-line prefer-object-spread |
| 119 | return Object.assign(error, { |
| 120 | name: "QuerySyntaxError", |
| 121 | location: mapToSourceLocation(query, syntaxError.cursorPosition - 1), |
| 122 | sourceFile: query.sourceFile |
| 123 | }) |
| 124 | } |
| 125 | |
| 126 | export function augmentValidationError( |
| 127 | error: Error, |
no test coverage detected