( error: ValidationError )
| 306 | } |
| 307 | |
| 308 | function hasValidLocation( |
| 309 | error: ValidationError |
| 310 | ): error is ValidationError & { location: Location } { |
| 311 | const loc = error.location; |
| 312 | return ( |
| 313 | loc != null && |
| 314 | typeof loc.start?.line === 'number' && |
| 315 | typeof loc.end?.line === 'number' && |
| 316 | (loc.file === undefined || typeof loc.file === 'string') |
| 317 | ); |
| 318 | } |
| 319 | |
| 320 | function toValidateError( |
| 321 | node: { type: string; lines: number[]; location?: Location }, |
no outgoing calls
no test coverage detected
searching dependent graphs…